The first one is the worst for most people. And it's bad enough when it's a patient who's been shifted to comfort care; it's worse when it's a failed code. When you walk into a room to find a person, who was fine half an hour or an hour before, is just plain dead, it's shocking. Codes are shocking, too, in their violence and their (usual) pointlessness.
That happened to a coworker of mine the other day. Her patient had been fine and stable and cheerful all shift long and had laid down to take a nap near the end of the shift. He was scheduled to go home the next day. When she made her last put-'em-to-bed rounds of the day, she found him not breathing, not pulsing, not responding. Just plain dead.
And we coded and coded and coded and it had the predictable result.
So what do you do when a code fails?
Well, first, you allow yourself a little freak-out. If you're lucky enough to work where I do, the other nurses on the floor will pick up the slack for ten minutes while you lock yourself in the bathroom and flip your lid. If you're not lucky that way, you'll have to do it while you fill out paperwork and call the eye harvester folks.
Then you figure out what went wrong. In most situations, absolutely nothing anybody could've done would've prevented the death. Short of overdosing a patient on medications or giving them the wrong blood or shoving a tube feed into an arterial line, dying is not something we have a whole lot of input into. Still, it's helpful to think about what led up to your patient's stopping breathing, if only because it'll reassure you that you didn't screw up.
Then you deal with your other patients. It's easy to forget, in the aftermath of a code, when you're overwhelmed with emotion and paperwork, that there are four or five or six other people that are still alive that are depending on you.
Finally, at the end of the shift, you go home.
Think about your patient. Raise a toast to 'em, if that's how you roll. Talk to your partner. Hug your kids or your dog or your cat. Roll into bed, with or without the general anesthetic of your choice onboard, and remember that every shift is a new one.
Everybody dies. Some of us die more easily than others, and in better situations. There is not a damned thing you, as a nurse, can do to prevent a death if it's gonna come anyhow. The best you can do is learn from the situation if it's less-than-ideal and use that knowledge to improve the lot of the next folks you take care of.