If you were struck down by a disease in your dream, then your unconscious may have been amplifying fears about your health in waking life. Alternatively, dreams which feature your death could also symbolize your desire to escape the burdens and responsibilities of waking life. Another explanation suggests that your dreaming mind has used your death as a symbol for something that has run its course in your waking life, encouraging you to start afresh with someone new or to make a change. Freud believed that everyone has two contending basic drives; eros—the drive towards pleasure and life—and thanatos—the drive towards death.
If the dead person in your dreams was yourself, you might want to consider what is being expressed in your dream.
Perhaps you fear dying and the dream is reminding you of your own mortality. Or are you trying to liberate yourself from something? Do you want to free yourself of emotional burdens and open yourself up to new possibilities?