Welcome to Just Answers. You certainly are having symptoms of anxiety
and panic, which need to be treated by a doctor. If you also have depression, it may clear up on it's own with treatment for your anxiety, or your doctor can give you medications that will handle both problems at the same time.
What you're describing is very common for people with anxiety disorders. Let me give you some good information on it so you can know what you're dealing with and what you need to tell the doctor.
Panic and anxiety.
There are techniques that you can start using right away with your intrusive thoughts of dying:
Intrusive Thought Elimination
When you have an intrusive, unwanted thought, understand that you can't control what pops into your head, but you can control what your mind does with it once it's there. This is a big key to success. Understanding that, you choose a positive thought - one that brings up a good feeling in you. Picture it in your mind and sit with it for a minute to enhance the positive feeling, and give this picture/feeling an affirmation that goes with it. IE: picture a warm walk on a sunny day and say to yourself, "I'm on the path to recovery and I know I'm going to make it."
Every single time one of the unwanted thoughts pops up in your mind, exchange it for your chosen thought. Do this every single time no matter if you have to do it 100 times an hour. Do it without fail. What you'll accomplish is to re-train your brain and you'll see that your intrusive thoughts will trigger your chosen thought, which will give you relief.
CBT is a great tool for anxiety, and can be started tonight. CBT self help
There is also online support and blogs that can help you not feel so all-alone and strange.
just google 'online support anxiety' and you'll see the lists.
This is a problem that can be solved with time, effort and focus. Keep peeling away at it, and you'll feel normal again in no time.
My best to you.
If you would, please fill out the feedback form after accepting. I appreciate this opportunity to help you out today. If I can be of further service to you, just put "for Anna" in the front of your new question, and I'll be the one to answer it.