I don't know, I'm a die hard nihilist and atheist and I'm married, have kids, friends, and think life is beautiful and generally ok. I don't see why people need to believe in imaginary stuff and I don't really see how it makes people happy.
I'm not optimistic. I think an accurate assessment of the world is, in a sense, pretty pessimistic. But I don't see any reason to get worked up about it. It would be very stupid to let my mind tell me that I cannot experience pleasure in the world just because the long term situation looks bleak. I can't control any of that stuff anyway, so why bother feeling bad about it?
Religious people tend to be less lonely , more likely to be married and have children, and more happy and less likely to experience mental illness, on average.
It’s certainly not true for every religious person nor the opposite for every atheist, but the effect can be seen across populations.
It's also demonstrated that meditation and volunteering improves well being regardless of beliefs... and atheists like myself have no excuse not to be doing those things right now.