Found this interesting reading
10 Types of Death Dreams and What They Mean – Learning Mind and it concurs with my understanding that death in dreams symbolises endings and beginnings. Take what you will from the link, as I haven't looked at that site before, but I find that dream interpretation is a fascinating topic.
I understand this may have been quite distressing for you as well, so lots of hugs