actually had this conversation with my other half last weekend. we were driving in pretoria, and got chatting about the oodles of churches and the general mentality bound to them.
i've had that 'seeing the light at the end of the tunnel' experience. i had flowers and flying though starry wormhole experiences as well, but that was with some herbal assitance

i think, that by the time one is one her/his way out, and the heart is taking strain, you're losing blood, you are in shock, your system is flooded with every chemical it can produce, adrenaline etc. and your brain is being deprived of oxygen. i recon your nerve-endings are going to be firing off all sorts of weird stuff.
i've had, for instance, seen haloes around things, starts in front of my eyes, shadows were there were none. if you pass out, you see all kinds of interresting shit.
and, naturally, if you live to tell the tale, your brain tries to piece together things in whatever way it can. its like trying to piece together a broken antique vase, but you have no idea what goes where, so you build whatever you imagine it to be. nevermind if its nothing like what it had been originally. here, i think, the case is, you find a whole bunch of pieces, that was part of nothing before, but your mind has the natural need to make sense out of it. so it hashes something together. and viola!! god, pearly gates....