So here you are, your PC's have returned session after session battling and puzzling through your labyrinth; you have put them through trial after trial and they have made it to the final battle. The evil mindflayer they have been pursuing stands before them, and they stand exhausted, yet summon their courage once again to save the innocent peasants who have fallen to the flayers tentacle-y appendages. A fierce battle ensues! One of the PC's is grappled, he is one die roll away from having his brain eaten! You prepare to roll the d20, your PC stares with wide hopeful eyes, the die falls, you look down and....the mindflayer rolled a natural 20.
If you've DM'ed before you've probably been in this situation before. Approaching PC death is a largely personal process. Some DM's have no qualms about killing of their players, some even enjoy the process of trying to mow them down. I've played with several different types and I have had to deal with this situation myself many times.
I find their is a very fine line that must be walked between mercy and severity to make death feel like a very real possibility, yet keep the players desire for fun in mind.
Here are a couple things I consider when deciding whether or not the PC kicks the bucket, or if they live to fight another day:
1. Will the character death serve the story?
2. Did the death occur because of some direct choice or just plain bad luck?
3. Is there a way to save the character without suspending PC belief?
Some PC deaths occur because of boldly made role-playing choices, others are just strokes of plain bad luck. If a PC intentionally put themselves in danger to save a loved one/the party/the world and fate happens to roll against them I usually let the character die in a heroic blaze of glory. This type of consideration underlines the importance of character's values, it shows the PCs that character motivations matter, they have very real rewards and thus very real consequences.
The most important tool a DM has in this field is the deux ex machina. If artfully used, saving characters from the brink of death can make your game more believable, more incredible, and make the PC all the more connected to the character they portray. It honestly all comes down to story though. And as a good rule of thumb when dealing with character death, is to remember that story always trumps rules.