Ah, a subject near to my heart!. Having had such an experience, I do not know. I've heard it is real and that it is an hallucination due to lack of oxygen to the brain. My opinion, our Father communicates to us in many ways through His Spirit. If it is a dream (I don't believe in coincidence) it may well be a gift of The Spirit of God. The message is loud and clear. We do not need to fear death. Death is sleep in a sense (in my opinion). We will sleep and then we will, eventually be tried and will be with our Lord. If we are blessed to have a preview by a gift from God, all the better. He and He alone knows our heart and our needs. In my experience, I was so afraid of death (the fabled HELL) that I honestly believe my Father gave me a gift of peace of heart. It's one of those things we can't know but must have faith. Fear not, for He is with you. I live my life, now, following the two commandment of Christ: Love God with all my heart, soul and strength and love my neighbor likewise. I am a sinner (Chief among sinners) yet I trust with all my heart that I will eventually be with my Lord. I no longer fear death. I wish that freedom and love to all. My advise would be to take the knowledge of this experience as a gift. Let it take the fear of death from you. We truly regret our sinful state (our flesh) and work our best to overcome sin. However, as soon as we think we have it under control, our flesh lets us down...how vain we can be. The bottom line is, we are the children of our Dear Father and He love us and will not stand to lose a single one of us. I honestly believe that many of these "near-death" experiences are visions given us as a gift...to tell us how our Father is with us.
I'm not a teacher and have no gift of knowledge. This is only my feelings on my own experience. I thank God for the experience. If it was a dream, hallucination or whatever, it was sent by way of the Spirit of God. Praise be to Him as it contributed to my peace of heart!
Blessings and Hope be with you,
Pogo