I think you’re looking for “I’m a psychologist get me out of here”. I can’t help but feel I’m about to do someone’s Religious Studies homework!
But what the hey I’l have a go anyway. I reckon it definitely does. Religion can have a real and positive affect on a persons mental health and happiness, through a strong feeling of love and security provided by the idea of a father figure, whether that father figure is real or not. People who have experienced this placebo effect on their mental health and happiness would probably be more inclined to believe that the source of this feeling has to be a real divine presence rather than a construct of their imagination.
Derren Brown performed an experiment where he used his psychological methods to make an atheist experience this placebo effect. She came out saying she was far more inclined to believe in a god than before!
Hello Kronicoptomist! Ed put it very well, nothing really to add! If you want to know more about the placebo effect in terms of medicine, ‘Bad Science’ by Ben Goldacre has a couple of very interesting chapters on it and homeopathy.