Hmm...
I can counter that by saying, with personal experience, that religion can just as often lead to depression and even suicide as it does happiness.
For one thing, those groups of friends you supposedly get? If you're too different, you don't fit in, and you feel it.
I was in the youth group at the local pentecostal church. A good strong one, too, with lots of kids. Not a one ever talked to me outside of the barest pretenses of civil conversation. I wasn't athletic. I was home schooled. Those two things meant I had nothing in common with them. I was only friends with another outcast, and he was a manipulative bastard who played with my emotions.
So, despite still considering myself religious and theistic, I don't have fond things to say about religion, and pretending that the bad doesn't exist or is outweighed by the good is disingenuous and actively harmful to people who have been harmed by religion and religious communities.
I know a kid from the same community who committed suicide recently. He was surrounded by people who actively prayed for him and it only made him feel even more alone.
So no, I don't buy it. Not even a single cent.