I'm going insane

I went to bed at 12 ish last night and was only able to sleep at 7 or something the entire time I had thoughts about nift and entrances and it's scaring me alot. I'm stressing out so much and i genuinely don't know what to do. I'm having sleepless nights and it's ruining my health too I can't stop thinking about the exam neither can I control my thoughts on it. It's too intrusive and involuntary. What do I do?