So sorry for the loss of your friend. It’s very unsettling when nightmares bring up emotions like you describe. I often have dreams that I got drunk and didn’t do something I was supposed to, and everyone is angry with me. Honestly that rarely happened when I was drinking, but seems so vivid in the dreams.
SR is a good place to come and get your mind sorted so hopefully you can get back to sleep.