I used to sleep 4 hours a night during the week cause I'd go out all night then go to my 9-5, didnt realize what I was doing to myself. Long story short I got myself so sleep deprived that it affected me into this semester.
When your sleep deprived you train your body not to sleep, its harder and harder to get a full 8 hours, if you can fall asleep at all. I also felt very depressed and confused to the point where I just didnt understand what was wrong with me and I thought all kinds of shit was wrong with me. Climbing my way out of that was straight up the hardest and most painful thing I've ever done.
Only thing you can do is regulate your sleep, 8 hours a night. If you cant fall asleep whatever try the next night, you'll train yourself to sleep regularly again, just be patient. cut energy drinks and caffeine for a while until you get yourself back to normal.
take it from me I've been there