I don't understand why people would assume that the brain produces DMT when we die. Why not 5-MeO DMT? That experience is supposedly a lot closer to the near-death experiences people report. I've heard several people as well talk about reaching "hyperspace" on a high dose of mushrooms. Maybe the brain produces psilocin when we die?
My thought is that a large dose of just about any psychedelic chemical can produce an "out of body" experience that many interpret as a near-death experience. I think it is just a natural defence function of the mind (be it physical or psychological). When sensations in the body get too intense, people leave their body. The intensity of sensations could be caused by physical trauma (an accident, heart attack, etc.), or it could be caused by altered brain chemistry from the ingestion of a drug.
Note I am not arguing one way or another whether ones "spirit leaves ones body" when they have an out-of-body experience, or what the implications are. I'm just saying, humans have a built in defence mechanism that causes them to dissociate from ( "leave" ) their body when things get really intense. Its not that there is some particular chemical which has a monopoly on this.
elphologist