This is a discussion I know well. These thoughts and feelings visit me in times of HIGH anxiety and the lows of depression. Somewhere in the middle is where things are OK.
Thoughts of why are we here? and what created all the heavens and the earth? and when did life begin, etc, etc etc, have been thought about since man has been around.
My wife and I often talk about the realities of life and death and all the whys and hows.
The best weapon I can tell you that helps with any kind of anxiety, whether it be existential or just plain panic or depression mixed with anxiety is exercise. Exercise is the one constant in my life that has helped me cope with the lows of depression and all the thoughts I have read in this thread. It's not always easy to pull yourself up and say you're going to make yourself feel better. And I cannot say in fact that exercise always works, but it helps with endorphins and it helps you relax.
I had all kind of crazy thoughts while I was in high school. I'd sit there in class and none of the class knew, but I'd have anxiety attack after anxiety attack. Sometimes I'd ask to use the bathroom just so I could spare myself from having another anxiety attack.
The other best possible advice I can offer is try your hardest to keep busy doing something you like. I know it does not make everything better, but it's one method of several methods at keeping yourself balanced.
I remember during high school, I was seeing a therapist, and I used to wonder what he'd say if I told him I thought I had died and I was just imagining I was alive. Or that I was alive, but just imagining that everything was happening that was happening.
I've got more thoughts on this, but bedtime is awaiting.
Take care,
David