At the risk of being a shamless self-publicist, there are a couple of papers directly pertinent to this whole discussion here;
Braithwaite, J.J., & Dewe, H (2014). Occam's chainsaw: Neuroscientific nails in the coffin of dualist notions of the near-death experience (NDE). The [UK] Skeptic magazine, 25 (2), 24-31.
link here
http://www.academia.edu/10060970/Oc...ist_notions_of_the_Near-death_experience_NDE_
Braithwaite, J. J. (2008). Towards a cognitive neuroscience of the dying brain. The [UK] Skeptic, 21(2), 8-16.
https://www.academia.edu/574245/Towards_a_Cognitive_Neuroscience_of_the_Dying_Brain
These papers pretty much tackle the whole discussion and provide a lot of citations / scientific evidence to back up the argument.
An important clarification I would add is this. Many of you here have highlighted the role of oxygen starvation - which is fair and good. However, not entirely the best and most accurate way to approach this and it causes no end of confusion amongst woo's. The reality is the hallucinatory imagery of the NDE is based in neural disinhibition (or over-excitation of neural systems if you prefer). Now, of course oxygen starvation, anoxia, hypoxia, are trigger processes for neural disinhibition - but - many things are responsible for neural disinhibition, so anoxia is not necessary for the NDE. The key is disinhibition, no matter how it occurs. Interesting there are documented differences in the imagery experienced by those truly near death and those who only believed themselves to be so - and the key difference is the degree of neural disinhibition present.
It is likely, in terms of a 'typical' death that disinhibition will be triggered when the heart arrests and oxygen is no longer being pumped effectly to the brain. So there is a relationship between the concepts. But as migraine and epilepsy show, you can get disinhibition in a brain where there is plenty of oxygen.
PS - take a look at the arguments about Syncopy in the first paper - often forgotten in discussions these days....shame really. There is a condition known as cardioinhibitory syncopy where the heart arrests and the EEG goes flat....after a while things come back online and hey presto.....patients report NDE type hallucinations....coincidence?