As much as you might like to, a person can’t survive without sleep. Fending off sleep may be your best attempt for solving a problem but it isn’t working. Your unconscious kicks in and gives you nightmares about the very thing you are avoiding.
As you’ve probably already discovered, staying awake as much as you do can make you irritable and depressed. It can negatively affect your memory, make you slow, impair judgment, and affect your ability to solve problems. Chronic sleep deprivation can have serious health consequences and can make you accident prone. So it’s good you wrote. This has to stop.
In your case, the issue is not a sleep disorder. It is a consequence of anxiety about a situation you think you didn’t handle well. Although I could give you my best lecture on how to get to sleep, nothing I say about that will be helpful since your lack of sleep is your effort to avoid dealing with something. You need to stop avoiding and address your anxiety directly.
If you could do that on your own, you would have done so already. Please take your sleepy self to a mental health counselor. A counselor will help you figure out how to repair relationships with people you feel you let down. Counseling will also help you learn how to more gracefully manage difficult situations in the future. Anxiety can be managed without sacrificing the sleep you need to be healthy, alert, and able to cope with your problems.
I wish you well.