I know this story seemingly has nothing to do with the afterlife, but it has somewhat shaped my view on it.
I went to the creative writing society of my university last year and, shit, it stirred up some anxiety. The vast majority of the people there were talented, creative writing or english lit students, so they made my silly attempts at writing completely pale in comparison, and most of them seemed to know each other. I only had the courage to read out my work after one of the exercises, and the group's reaction was pretty much just "Mm, okay". I was riddled with anxiety the whole way through, regretting even showing up, and just wanted the thing to end. Needless to say, when I got out, I immediately grabbed for my cigarettes.
As I was smoking, I got really ill. Like... really ill and dizzy. My blood pressure, my anxiety, the cigarette... idk what caused it, probably a mix of all three. I just sat down on a bench on campus, in front of the store. Sat there for like half an hour and only got worse. Eventually, I thought I might be having a heart attack or a stroke or something. My mind and my thoughts were just fading away into nothingness. I thought I'd just slump down off my bench, and become a story in the next student newsletter about a student dying on campus. But nothing really happened, I just sort of recovered from it.
Anyway, not a literal near death experience but, that kinda made me feel like that's what death might be like. You just stop functioning, like a broken computer. At the same time, I've had other experiences, like remaining "lucid" while technically entirely unconscious with my eyes closed while I was a small child. So I don't really know. But I don't think I really believe in an afterlife anymore.
To be honest, I don't know if I'd even be comforted by one existing. Eternal life scares the hell (no pun intended) out of me, just as much as ceasing to exist. Reincarnation would be the only thing I'd be somewhat happy with, but even that is leaving behind everything you are in your current life to enter the next.