No one can know there is an afterlife without a doubt.
We all comfort ourselves with lies or willful ignorance of the truth, religion is just a societally accepted delusion that also ticks that box.
There are a few reasons why you may be seeing a lot of suicidal atheists, one being that a certain degree of suffering instills doubt and allows a person to open their eyes to the fact that there is no God, there is no one looking after them, and if there is, they must be worse than the devil himself-if this is the torturous existence bestowed upon so many. Prayer does nothing.
Also, if any religious people are suicidal, they experience more fear and stigma surrounding it, as most of them have been told suicide is a sin (it's not) and that they will go to Hell for eternity (they won't).
In the end it's not about comfort, it's about being realistic, we are already in pain and discomfort, everything else is just more of the same.
I don't think anyone should kill themselves with the expectation of something more to come, or with the belief that they will be reunited with loved ones in paradise..that's a dangerous way of weighing the risks vs the benefits, especially when the most likely outcome is that we simply cease to be, while our corpses rot in the ground.
It's not pleasant and it's not fair but it is the truth which a lot of people cannot handle, for one reason or another.
Some are also privileged with a good life with far less destruction, so of course those people are more likely to believe there is a higher power watching them and rewarding them.
These lucky ones still complain but in comparison to us, they live in sweet, saccharine bliss and spit in the faces of those who don't, thinking perhaps they (the victims of life) deserve the hand they've been dealt and that God punished them for good reason-however false that sentiment may be.
For me specifically, I was raised catholic and I questioned my religion pretty early on, more out of skepticism and irritation than because of my own pain...that intensified later on, but not much later, and the more I learned, the more I suffered, the more my lack of belief in the absurd intensified.