If you think of death as a transition -- of moving from one state to another, then death is not so fearful (especially if you believe there is more after the physical body dies). Death is as natural as being born -- as natural as living. Each must occur in its time. To die is to be reborn in another state -- and the cycle continues.
Remember that dreams speak in metaphors, that is, they say or show one thing but mean something else (but there is a similarity between what they show and what they mean.) Remember also, the characters in dreams are almost always aspects of our self. So dreaming of a friend dying is really about some part of our self that is dying -- so that some other part can be born or grow.
If I were to have a dream that my friend is dying, I would ask myself, "What part of me is ready to die? What part of me is ready for a transition or change? What part of me is ready to be born? Where in my waking life might this change -- this transition of death and rebirth -- be taking place?"
Help in answering these questions is right there in the dream. Who or what is dying in the dream? What are my associations and/or relationship to this person or thing in my waking life? What characteristic comes to mind when I think of this person/relationship/thing? How or where in my waking life do I exhibit this trait? What would happen if I let go of this trait, this part of me?
Each of us accepts change differently. Some of us (like me) welcome and even encourage change. Others fear change and are resistant to it. No matter how you look at it, change (death) fosters new growth and new opportunities. To try to control it or fight against it makes the transition more difficult. To accept it and "go with the flow" makes it easier.
The dream of something or someone dying offers the dreamer time to reflect and prepare. If we are prepared we can accept, welcome and even encourage the inevitable transition. If we allow one part to “die” we make room for and encourage another to “live” and flourish.
As always, only the dreamer knows for certain what their dreams mean. If the above does not sound "right" for you, you should disregard it.