medical science says that once a human being dies his Life cycle is ove. You have to accept that death is also a phenomenon like birth and we have no control over it. we must respect death. You are getting depressed because you have to accept death as it comes. Respect it. Meanwhile change pattern of thought slowly and day by day on what the doctors say about it.
I respect your feelings and reaction. it is normal every one gets. You have to use your time intelligently. Thing of death will lose your time and emotional health. you continue to doe what you have to on a regular basis. Ignore that we become ghosts. As long as it does not happen that is fine. if you get it consult a psychiatrist
for treatment which will stop with treatment. There is no guilt in consulting a psychiatrist.