I'm going to be very beige and say "it depends". Here is what I feel should happen in these circumstances:
As has been said, there would have to be absolutely zero doubt of the criminal's guiltiness. He or she would have to go through several trials, and even a single jury member voting innocent would have to prompt another series of investigations and court-cases.
Second, the criminal must be dangerous enough that keeping him/her prisoner is a risk, or the crime must've been so horrific (such as extreme mass-murders or genocide) that the number of people impacted by this person is large enough that the death of the person would bring genuine "closure" to those people. Perhaps not dissimilar to the hanging of Saddam Hussein, for instance (just using this as an example, I make no side there) where many, many people were affected by his alleged actions.
Finally, it should not have to happen often at all. The crime would have to be so irrefutably wrong for somebody to be given the death sentence, wrong on perhaps an international scale. It would not be something considered lightly; in most cases, imprisonment and/or lots of hard labour would be the punishment. This is an absolute last resort to be used when so many people are crying out for the death of somebody. It sounds horrible, I agree, but how horrible must the crime have been for something like this to occur?
I definitely disagree with "an eye for an eye". Murder would not be enough for the death sentence, not by a long shot. I personally would prefer to never see the death sentence actually issued, but rather kept as a deterrent. If it were not for this preventative factor, I would not advocate the existence of capital punishment at all.