There are many theories why we have dreams, including: 1. "One theory suggests that dreams are the result of our brains trying to interpret external stimuli during sleep. For example, the sound of the radio may be incorporated into the content of a dream." 2. "Another theory uses a computer metaphor to account for dreams. According to this theory, dreams serve to 'clean up' clutter from the mind, much like clean-up operations in a computer, refreshing the mind to prepare for the next day." 3. "Yet another model proposes that dreams function as a form of psychotherapy. In this theory, the dreamer is able to make connections between different thoughts and emotions in a safe environment." 4. "A contemporary model of dreaming combines some elements of various theories. The activation of the brain creates loose connections between thoughts and ideas, which are then guided by the emotions of the dreamer." 5. "...a possible (though certainly not proven) function of a dream to be weaving new material into the memory system in a way that both reduces emotional arousal and is adaptive in helping us cope with further trauma or stressful events." It shouldn't really mean anything that tragically impacts your life in any way, according to the above theories. There is no way dreams can precisely predict the future.
To prevent getting anymore dreams about death, try to relax and think pleasantly. Do not stress. Drinking hot milk before bed can help. Also if it's too hot or cold in the room, it may cause unpleasant dreams. Stay comfortable as well, and don't think negatively. Avoid doing anything, such as watching scary movies, that may increase the risk of nightmares before bed.