Not alone, I had this a few years ago but got over it. How you deal with this depends on your own mental structure.
You could try an abstract form of denial. Examples of this include religion with afterlife, quantum immortality, epistemological immortality, or ‘it’s all a simulation’. See also qualia, and extended conscious experience.
Alternatively, you can practice nihilism. Nothing really matters, including life itself. What does it matter if humanity ends? Life has no point so if we die, so why should you care if it happens?
You can practice pragmatism. Death is inescapable, and there is nothing that can be done about it, so don’t worry about it. What will happen will happen. Might as well get on with life in the mean time and worry about death when you’re dead.
Acknowledge that death may be good in some contexts. Some suffering (like depression, torture) is worse than death. Death provides an end to suffering. Death is the great leveller as fuck and poor, success failure alike will all die the same. It takes the pressure of succeeding in life off.
You could also simply be thankful that life exists at all.
Discuss with your friends and family. Often they have good insight. If you find that you are still struggling do add others suggest and seek medical help as this may be the manifestation of a mental health problem which could be treated.
But don’t worry, most people go through something similar at summer point of their life, especially if they are the questioning type. I have personally adopted a bit of a mix of all the above, and it’s really broadened my love philosophy and I’ve become a better person for it.