I have extremely negative thoughts, anxious thoughts, or painful memories as I try to fall asleep every night. They keep me awake. I try to refute the thoughts or do exercises (think it through,journal) to calm my mind. They calm my mind but when I lie down again, the thoughts return and I cannot sleep. 


It makes me even more anxious as the minutes pass by and its another minute of sleep im not getting for work tomorrow.  I either lie awake crying from the stress of not sleeping/bad thoughts until the headaches lull me to sleep or stay awake on youtube or online until I pass out.

 I am also worried about staying up watching tv to distract myself because I worry it will make it harder for me to sleep at a reasonable time. 

I do have melatonin which works very well but  too well ; I am too sleepy, Ive missed alarms for work that way, or arrive at work very groggy and sleep as soon as I return back home, which leads me to sleep until midnight and then back up again.

How do I end this cycle?