Or to put it more academically correctly, your view of God as either benevolent or vindictive is correlated with your risk of psychiatric symptoms. At least that’s what recent research published in the Journal of Religion and Health seems to indicate.
How mental health and religion affect each other has been a matter of debate for many years. Some have argued that strong religious beliefs increase one’s risk for anxiety, depression, obsessive-compulsive disorders, or even delusions and hallucinations. Some great Christian leaders including Martin Luther, John Wesley, and Charles Spurgeon struggled with severe anxiety or depression. And then there are the caricatures of Christian believers in popular media who claim religious reasons for illegal or violent acts, or clearly display signs of mental illness.
On the other hand many believe their faith in God has helped them weather times of extreme stress, and provides an emotional/mental stability they would not have otherwise.