The way I look at it is by accepting that there are only two possibilities.
- There is an afterlife
or - There is no afterlife
If the former is true, than death is not the end and we will continue on somehow.
If the latter is true, than death is the end, and we won't exist to be sad about it.
A few years back I experienced sleep paralysis with hypnagogic state of the "shadow person" variety. At the time, I didn't know what sleep paralysis or hypnagogic imagery was. All I knew was that I had woken up and was unable to move my body. I could feel someone holding me down on the bed, as though pushing me down against the mattress. When I opened my eyes and looked, standing next to my bed was a silhouette of a person wearing a hooded robe. Never in my life did I feel as much fear as I did during that experience, and I completely 100% believed that I was about to be killed.
My thoughts did not turn to regrets, my family, or dreams I hadn't accomplished yet, and I didn't pray to any deity to save me. Instead, because I knew it was about to happen I just shut my eyes and waited. Seconds later the sensation of pressure was gone, and when I opened my eyes the silhouette had vanished.
I had accepted death, and my fear was only about it hurting, not about dying. I think when death approaches everyone will be afraid, regardless of their beliefs, but that there will come a point near the end when that fear of death will go away, and they'll accept it.