You have anxiety and are having panic attacks. Your heart will beat really fast, you can have a hard time swallowing, it can feel like you can't breathe, you can start sweating, you can shake all over, you have have hot flashes, and have obsessive thoughts. You are not dying. Just remind yourself you are having a panic attack. You are not dying. You don't have a disease. Smoking for a few years is not going to kill you.
People have obsessive thoughts about dying when they are stressed about something in their life. Find out what is stressing you out and work on solving those issues. Make an appointment with a psychologist for individual therapy. Most likely they will suggest CBT (cognitive behavioral therapy) or DBT (dialectical behavioral therapy). Individual and group therapy will help you with your anxiety.
Things to help during a panic attack:
Visualization - visualize you are in a relaxing environment. (the ocean with the fresh air, flowing waves, and sand in between your toes, slowly floating in space, etc. whatever you find relaxing)
Everytime you start obsessing about dying or anything else - close your eyes, breathe in, breath out, visualize the relaxing place, breath in, breathe out. And continue doing that. It will help your muscles relax and to sleep.
Also drinking Bedtime Tea can help with insomnia.
Take a hot bath to relax before bed
Buy a cold pack or use a a bag of frozen vegetables -- hold the cold bag in your hand and do your breathing exercises.
Put the cold pack on the back of your neck. You can sit up or lay down with the cold pack. You can also put it on your forehead. Usually the hand or the back of the neck works the best. I prefer the back of my neck.
You can splash cold water on your face.
Go outside and get fresh air. Oxygen! take deep breaths!
Stay busy during the day. Don't sit around and let rumination take over. Eat your meals at the same time everyday. Go to bed and get up at the same time even if you are tired or have insomnia. Get at least 30 minutes of exercise everyday. Don't read, watch tv, play on your phone or browse on the computer for at least one hour before bedtime. Don't drink caffeine if you have anxiety.
Here's a good website to read about panic attacks and different techniques to help calm you down:
I appreciate your answer
You really helped me
You're welcome. I hope you start feeling better soon.