They’re related psychological phenomena (also highly related is going to be your perception of and relationship with your own father). This is why an understanding of the goodness of G-d is important to cultivate.
It should also be noted that it says in Genesis that G-d promises not to destroy the world ever again like He did with the flood. This is important psychologically because it prevents this type of apocalyptic millenarianist thinking.