I need sleep advice

I suffer from Agoraphobia but was getting over it until recently, I had been insomnia free for nearly a year, and my depression wasn't keeping me down as much. I have started the second year of college. In fact, I was going to start the morning I was broken into.

I was all excited, all organised, I had my alarms set and spent weeks getting into routine to wake up happy and ready. I had my clothes laid out that night. My partner hyping me up, I went to bed earlier than he did to keep in my rhythm. Then it happened. 2am I woke up to the sound of a crash. I figured, with my partner being slightly clumsy and a night owl, that he'd broken something. So I went out and sitting in my living room was a man I didn't know. I didn't panic though, I assumed it must have been a friend of my partner's from his course, and that's why there was such noise. So I asked where my partner was, but got a response of "who?". Then I noticed, the door had been broken open and there was blood on my wall and floor. And my partner was nowhere to be seen. I asked again, firmer where my partner was, the man who lived here, and my blood ran cold when all I got in response was being pointed out the door to the dark halfway of our apartment block. I tried very hard not to show I was scared. My brain did the only thing it could think to do when something like this happens. Phone. It was in my bedroom, so I quickly turned and ran. This man seemed like he was on drugs so I didn't want to take my chances with my back to him too long.

Once I was in my bedroom I closed the door and grabbed my phone. While grabbing my phone I saw my partner fast asleep in bed. You can't believe the relief I felt. I woke him up saying there was a strange man in the house. He went out to deal with the man while I called the guardai (Irish cops). My partner was thrown against the wall and threatened by this man we didn't know. (Suffering neck injuries from it). The man left shortly after my partner talked him down ( he realised the man was on drugs and using violence wouldn't work). The man left before the guardai arrived but he was caught and charged.

We have 3 new locks on out door, which was a heavy door with deadlock to begin with. We lock everything at night. I sleep with my cane (fibromyalgia) by my bed and my phone is constantly by my side. We're even moving to feel safer. But I still can't sleep, or stop having nightmares about that feeling I had when I thought my partner was hurt or another break in but this time he isn't in the bed, he's in the hall dead. Of what could have happened to me, I was in my underwear when I went out to the living room.

I need advice on how to sleep when something like this happens to you. How do you stop the nightmares when everything that's in them is plausible?

My agoraphobia has gotten to it's worst again, my depression is messing with me hard, my insomnia is rendering me unfit for college and my studies are suffering as a result. If someone were to say boo around a corner to me I would cry when before nothing spooked me.

I'm open to any advice.

(Anonymous because it's an ongoing case)

Edit: I still don't know where the blood came from.