What a terrible nightmare, I'm happy that it was just a dream. In most cases, it's advisable to pray about it.
In my believe, dream is a message to us and the meaning of the dream may vary depending on your experience.
And sharing the dream will help you as well, so it's a good thing that you shared it with us.