Further than this, DMT is endogenous and protects against hypoxia:
https://www.frontiersin.org/articles/10.3389/fnins.2016.0042...
http://beckleyfoundation.org/2016/09/15/the-first-study-to-s...
Some are lead to believe that DMT is released during a NDE as a last attempt at survival.