Near Death Experiences are very common. And while most people attribute them (and their visions of the afterlife) due to previously held religious and world views, the confusion around them is most likely a mix of 'survivor guilt', PTSD and lack of medical knowledge. However to find out why NDEs happen in the first place, we have to first understand the difference between 'clinical death' and 'biological death', and most importantly, how the process or timeline of biological death, effects the brain.
It all revolves around blood flow and those portions of the brain that most needy. They are the first the disintegrate and dump their neurological transmitters into the system. So I suppose the order would rather crudely be; the frontal lobe (which basically controls intellectual thought and memory), then the Parietal lobe (which handles the human senses) and then finally the areas around the mid brain (which oversees the unconscious bodily functions). That's why when people have been resuscitated after around 3-4 minutes of clinical death, they are often no more than vegetables, due to the fact that most of the high-order brain centers have been irreparably damaged.
While I'm not a doctor or a psychiatrist, if you can't seem to let go of these feelings or put them into their proper perspective, I would recommend returning to a medical specialist for help. As with all brain injuries, you should expect some ongoing issues that may last quite some time, but new synaptic pathways form in our brains every day and recovery is possible [conditions apply], so I wouldn't give up hope.