I hate to admit it, but I don't know that I've ever had a D&D character die.
Campaigns have died, stalled, ended abruptly -- leaving characters in limbo -- but I don't think they've ever died.
I did have a Champions character die once. It was PERFECT for the story and he died heroically, so I didn't mind a bit.
If player choices led to the death of the character -- good or bad -- and the player knows they had some autonomy, then character death is something most players can deal with.
-=-=-=-=-
At the risk of angering a dear friend, I will tell the story of the death of a noble cavalier-paladin.
Sir Neville Trollbane (played by my friend GZ), a cavalier-paladin (this was right after
Unearthed Arcana came out) was a TANK. Nothing could stop this guy. He had awesome stats, field plate armor, magical weapons, loads of HPs, etc. Amazing character!
My monk, Robyn and Neville were adventuring companions. I was forever in his shadow. When I was dealing 1d6 damage with my staff, Neville was dealing out 2d4+6 with his magical bastard sword. My AC was something like 6. His was -2.
You get the idea.
Anyway, we were sent on a quest to retrieve a magical item for another paladin. I had promised to retrieve this magical sword...
Oh wait! ROBYN DIED! I handled it fine. :) A noble paladin of my order raised me from the dead. I got enough experience from the event to make 2nd level!! :)
...because he had raised me from the dead. There was this magical room in the bowels of "Bellicose Keep" (JD's megadungeon) that would allow you to take
any one item of any kind, BUT ONLY ONCE! It was called the "Chamber of Want" or something like that.
The paladin couldn't go in after this sword because he had used up his one and only entrance into the chamber to retrieve some "realm saving" magic item a decade or so earlier.
First you had to find it, then you had to fight your way through a maze and there were puzzles too...
Anyhow, Robyn and Neville found their way into the chamber. JD, the DM, asked what we were looking for. I said I was looking for this "holy sword..."
"You find it," JD stated.
"Robyn takes it for the paladin," I replied.
JD then asks GZ what he's looking for....
Now I don't remember WHAT Neville was supposed to find and bring back. Turns out Neville didn't remember either.
GZ asks what's in the room. JD starts describing things.
Armor, weapons, shields, wands, rods, staves, potions, gems...
Neville seizes upon the idea of magical armor! "Is their magical field plate armor?" "Yes."
"I take that!"
With that solved, we leave the "Chamber."
-=-=-=-=-
Once outside, JD asks GZ, hey weren't you supposed to get something for the paladin?
OH YEAH! Neville goes back in!
Now remember, you can only go in once and you can only take one thing.
Neville looks around for the item for the paladin BUT HE SPIES A MAGIC SWORD INSTEAD AND HE TAKES IT!
Now JD has to decide what the penalty will be for violating the rules of the chamber. He decides (or perhaps he had decided in advance) that the penalty was HALF of your HPs.
Not damage. Permanently lost. HALF.
To Robyn, this would have been crippling. I didn't even think about going back in. To Neville, the cavalier-paladin with a ton of HPs and an AC to die for, decides, "Eh. No biggie."
HE STILL DOESN'T HAVE THE PALADIN'S ITEM!
Here's where the communication between DM and Player broke down -- it was all about MATH!
You see, JD the DM was thinking: Half + Half = All
GZ the Player was thinking: I've lost half, if I lose half again, I'll be at one-quarter.
Those are VERY different things...
Needless to say, when Neville went back in (for the third time) to get the paladin's item, he dropped dead upon exiting the chamber.
:( That was an (ahem) exciting incident!