In Help me I mentioned the meaning of life, and to many religions, the meaning of life is to serve god. Whilst not religious myself, there is no question that many people find purpose in life through religion. In the same way meditation can take the mind's focus away from life's problems, prayer can do the same, and thus achieve the same benefits of taking the mind away from its negative script, and creating some purpose to life.
Taking aside for a minute prayer and following any particular religion's laws and practices, getting closer to a religious group can have much more practical advantages. Most religions are welcoming of new people. For anyone feeling lonely, isolated or depressed, this can be invaluable. Being welcomed into a new community, where people will hopefully show friendship, can be a big help.
There may well be a chance to get involved in various community or charitable projects, which can provide a) something to do, and b) a purpose - both very valuable for people who are feeling low.
So, for anyone without a strong aversion to religion, it may well be worth contacting a local church, temple or synagogue, and seeing how you can get involved. My own experience of spiritual leaders is that they are deeply compassionate people, who will try hard to support and help anyone in their community. I would suspect if someone explained a little behind their reasons for getting in touch, the leader will try extra hard to be of help.