Well i wasn't on the brink of death (i felt like it), but i can tell you about a time i accepted death.
this was about 10 years ago, i was 20, visiting a friend in LA and attending E3 (i work for a game developer)
To make a long story short, i felt really off for a few days, and i thought i as coming down with a stomach bug. At first i thought it was food poisoning. It got worse and worse to the point i was in the fetal position, moaning, just miserable pile of meat. My buddy decided it was time to goto the ER. We hopped in a taxi (we were at a hotel) and my friend was like "Ill pay you whatever, get us to the nearest hospital asap my friend is dying". We drove pretty fast but i remember laying in the back seat, i remember it was sunny and i just stared at the passing trees and i remember thinking "This is how it goes down" and i sort of zoned out, pain was sort of numb.
I sat in the ER for like 45 minutes. Nurse told my buddy "If all of a sudden he doesnt feel pain please let us know."
At that point it was triage, people who were in accidents had priority and i remember a few people being rushed back.
I eventually made it back to see a few nurses. They gave me a shot of morphene and i IMMEDIATELY felt great. The nurses were cute...
I ended up having a partially ruptured appendix, got it removed via Laproscopy. The doctor showed me a picture of the appendix before he removed it, there was green bile pooling. He said if that got anywhere it would have been a different story.
Also if anyone has ever had to go under... its pretty insane.
I remember the Anesthesiologist kept asking me the same question.
As the drugs bore down, i remember saying...
'Dude i cannot remember what you are asking me if you keep on asking me!' and thats the last thing i remember before waking up being carted back to my recovery room.'
TL;DR - thought i had bad food poisoning, ended up being ruptured appendix, accepted death, cute nurses gave me morphene, I lived.