I can only make an educated guess. The last few months have been terribly stressful. You had help in the hospital but then had to return to school where you were betrayed by friends. It is no wonder to me that you are anxious and upset. It is also not surprising that the same feelings you struggle with when you are awake bother you when you are asleep. It’s as if you are trying very hard to make sense of all that has happened.
You said that you are on medication. You didn’t say if you are also involved in talk therapy. If not, please, please get yourself a therapist. If you could resolve these feelings and move on on your own, you would have done so already. You need the wisdom and support of a therapist to help you.
If you are with a therapist, please share what you have written in your letter. It might be easier to just take your letter with you and read it to her/him during the next session as a way to get started.
In addition, please do talk to your prescriber about your nightmares. Sometimes sleep disturbance is an outcome of medication. It may be that an adjustment to dosage or a change of medication will help with the immediate problem of getting some good sleep. Even if that is the case, I hope you will sign on for regular sessions with a therapist for a while to help you fully recover from the depression and anxiety that has plagued you most of your life. You deserve to move forward with peace of mind.
I wish you well.