I think that the death penalty is driven by emotion, but that logic is used to justify the emotionally driven desire.
The desire for the death penalty in lieu of more economical and effective means of punishment can only be driven by emotive need for "eye for an eye" justice.
And the thing is, that revenge IS the purpose of the type of consequence.
The only reason that the death penalty exists is that people feel that commiting certain heinous crimes makes the criminals deserve to die. Sure, the fact that a punishment is rendered is a consequence, but the driving force behind that type of punishment can only be vengence.
Vengeance in and of itself is not a bad thing. My issue with the death penalty is that it grants the governemnt the power to exact revenge instead of the people.
I would be in favor of organized duels before I would favor the death penalty. This could exact revenge without granting extra power to the government.
Now, let me add, that it is possible to have logical reasons for favoring the death penalty, but emotion is the driving force behind the majority of people's opinions on the issue in either direction (for and against).
Anti-death penalty types often use the emotional plea of "What about innocent people" when that is a pull at the emotions regarding false imprisonment. While pro-death penalty types typically cite the victim's family and their well-being as a reason for the death penalty.
This doesn't mean that all people do so, just that the majority do. I rarely encounter truly logical arguments regarding the death penalty from either side.
Thus, I would say that both sides are driven by emotion, not logic.
I would not say that is the only way it can be viewed, though.