My optinion is that there are some (albeit *very* few) actions that might make a person "deserve" a death sentence BUT do I think a death sentence should ever be served? Hells no.
Even trials when a case is proved "beyond reasonable doubt", mistakes get made, and death is irreversible. Furthermore, I disagree with putting a person on "death row" (as per USA) for several years - not only are you inflicting anguish on them but they have nothing to lose and behave irrationally and often violently (beyond the behaviour of those with life imprisonment sentences) and others may get hurt in the meantime. If you intend to kill them, further tormenting them is both pointless and inhumane.
Then there's the fear factor. If I was accused of a death-penalty crime I very well might confess whether I was guilty or not if it meant I'd get imprisonment instead. Which would be a good thing if I were guilty, but if I were innocent the real criminal escapes to continue his spree at will.
If you absolutely *insist* on having a death penalty, give them an appeal; if that fails then make sure it's carried out within a week. Take them to a quiet room for an interview with a preacher of their choice and a last meal, note their final words then get it done quick and painless. Blindfold then a pair of .22 rounds to the back of the head - whole thing takes 20 seconds, rather than painstakingly strapping them down, carefully inserting an IV shunt, etc. No need to wait around or drag it out. Alternatively use the lethal injection as is, but render the prisoner unconscious with sedatives for the entire affair. And FFS don't have a sodding audience, for everyone's sake. Unnecessarily humiliating for the prisoner (see above point re: torment), and disturbing for those who watch. Unless I'm very mistaken that sort of sh*t will haunt you for years, or it bloody well should.
As for killing in defense of self or others, that's often unavoidable so I'm fine with it, to some extent (for example there are situations where I would do it, albeit with hesitation and probably remorse). A trained professional (SO19, SWAT, etc) should exhaust all other options first; anyone else should obviously have some slack but only if someone is actually under threat - housebreakers don't count if they're not armed, I reckon most would leg it as soon as they realise they're about to be caught, especially if they see you're armed; B&E is one thing, assault (or murder) is another.
As for myself, my policy would be to put 'em down as efficiently as possible but leave them breathing - that's why I did a bit of martial arts; if I get mugged I'd happily trip the bastard, maybe break his arm or choke him out, then GTFO. Any of the manoeuvres I know would heal in no more than a few months. Of course this relies on being in a country with halfway-sensible firearm control, so I'd be screwed in the USA - I'd just hand over my wallet like a little b*tch 'soon as I saw any kind of firearm.
Location - UK (in case you hadn't guessed).
TL;DR:
Self-defense aye, Death penalty nay.