The closest I've ever come to dieing was on a solo dive in 15' of water.
About 3 years ago. I was doing a drift dive in fast water in a local river. We can travel about 4 miles in 20 mins. It's impossible for two divers to stay together, but I was solo that day. The law in the river is that you have to have a dive flag with you, so I did - 20' of line clipped off to my D ring. I also had my wife follow the flag along the river by car.
There is a place where the current has dug big holes around huge rock structure (about 10' around and 25' high), which actually break the surface. As I came roaring into the hole and by the rock, the flag got stuck on the rock at the surface. The current started buffeting me against the stone face at about 15' deep. I unclipped the flag rope, but the line had tangled around my valve as I was being tossed and banged against the rock. I was fighting hard, trying to reach the valve and find the rope, over-breathing the reg, unable to get a good breath and being smashed over and over against the rock.
I could feel myself losing consciousness, slipping away...and I had this sudden moment of calm clarity, and it seemed so funny all at once that I was about to bite it here in 15' feet of water about 4 blocks from my house with my wife in the car watching the flag. For some reason it seemed really funny, and I couldn't see anything and I didn't have any strength left so I just let the current bang me into the rock over and over...
And then the rope came free from the rock and I tumbled downstream. I'm guessing that I was only there a minute or two, but it seemed like forever.
I managed to get to shore, and my wife picked me up. I really down-played the event to her, but she kept asking me if I was alright because I was so quiet.
Even though it was a solo dive, even a buddy would not have been able to stay near enough to help.
I've done that dive a few times since, but without the flag, law or not.