This used to scare the shit out of me but I got over it. The thought of 1000's of years going by whilst you're just ''nothing'' is quite scary.. then you think it's happened for so long. The people in the 17,1800's completely gone. We'll be the same one day.
A way I cope with it is following my ambition so I'll be proud when I go. Knowing that each of my idols/friends will be going as well and my family makes me feel better. It'd be hard living longer than everyone you once knew and all your idols, it wouldn't feel the same making new ones and it would drive you insane. We all have to go one day.
I personally don't believe there is anything, when you imagine how we're so much like bacteria in the universe.. we could just be lucky to get the life we have got.. one day the sun will get bigger and just burn the earth to a pulp unless a comet doesn't get to us first. There's life somewhere else, with the same exact thing but they may be much more intelligent. All the people who didn't know what death was back in the day, we're smart enough now to question our own lives existence. I don't know why but I just feel like there is nothing, then I think about how magical life itself is and that makes me question if there could be some form of ''next life'' what if the point in life is to associate with people? The people you associate with you get to meet on the ''afterlife'' and you get put as the ''favourite age you lived'' I don't know, that'd be cool but probably unlikely.
Don't live a life thinking about the inevitable end which is death. Live your life thinking about living, that way it'll be much better when you go.
Some quotes that you should think about when you're having one of your ''nights'' it might help you feel a bit better.
“I do not fear death. I had been dead for billions and billions of years before I was born, and had not suffered the slightest inconvenience from it.”
- Mark Twain
I want to live forever, or die trying.
- Woody Allen