I've been struggling with it for a year, and it has been horrible, but I've mostly got it under control now. Staying up for 1-2 days was common, and at my absolute worst, I was awake for 5 days, got 4 hours of sleep, couldn't sleep the next night, slept again, then missed another night. I don't know if these tips will work for you, but they've worked for me:
1. Worrying about sleep and general stress are one of the biggest killers of sleep there is, as your pretty much stimulating yourself. If there is pain in your chest, it's probably because you have been worrying too much. If you're worried about some little possibility that you wont sleep, that's going to keep you up. Sometimes you don't even realize how worried you are. I realize that when you have anxiety, logic is thrown out the windows and it's hard not to worry, so the best way to eliminate worry is to study and find answers online. /r/insomnia can be helpful and sometimes unhelpful. If they tell you to be very concerned, they aren't being helpful.
2. Around 40~ families in the world have fatal familial insomnia. If your parents or grandparents didn't have it, you're going to fall asleep eventually, whether you want to or not. Your body will find some ways to adapt, and even if you're still not convinced, those people usually live for more than several weeks if not a year, the whole death from 10 days of being awake thing is a myth that has been spread for too damned long.
3. Exercising is good, but you may have trouble sleeping if you do it close to bed time. It also wont be very effective early in if your super worried about dying from insomnia. Eating an entire meal and bathing before bed can also screw up sleep, though bathing might help some people.
4. Don't spend all day trying to go back to sleep. Wait until your usual bedtime. Unless you are trying to sleep, get out of bed. You gotta train your brain to associate beds with sleep. Nap time and time spent in bed will cut into your sleep time.
5. Think about random thoughts that don't require much brainpower while you sleep. Lewd thoughts can be sort of relaxing to me, but if I have them when trying to go back to sleep, they after wake me up even more since sleep increased my libido. Soothing audio can work for some, but personally I tend to focus on them while trying to sleep, and that keeps me awake.
6. Regardless, if you can see a doctor, go for it.
7. Sleep mis-perception is Post too long. Click here to view the full text.