In Souther Italy we have a superstition: we believe that dying in your dreams will make your life longer. Same thing for the death of other people
By a psychological perspective, dreaming of dying may also mean that a new life is starting, that changes are going to happen, so the "old" you dies and the "new" you will be born at once