False... absolutely false. Given enough time, some people might conclude that they don't want to do the time, so they won't do the crime, but in the heat of the moment the rationalization is of a more immediate nature. A person committing a crime is having a fit of selfishness, and often can't even see a few minutes into their own future. Even if death sentences were carried out immediately, there would still be a portion of the population that would think "I'll get away with it" or "that doesn't apply to me" and there will be a portion of the population that just doesn't think.
In my opinion, the death sentence is only useful to prevent people from re-offending. For the most part, it's not a deterrent for the first time. However, from your statement above it appears you may have confused the death penalty with a suspect being shot to death. Aside from the end result they have nothing in common. A police officer has a right to live, and a duty to protect others. Each of those is a different standard that must be measured in using lethal force. More latitude is going to be given in a self defense scenario than in a protecting others scenario, and if neither of those concerns are in play, there is really no legal justification for using deadly force. But a death sentence on the other hand fits neither of those situations, but is still permitted under rule of law.
Rage is an interesting emotion. Watch THIS and if you can tell me at what point has the _perpetrator_ reached their limit of force, then you can make the argument that police should obey a similar limit of force. Admittedly this is not a capital situation, but the victim in that video certainly could have died in that encounter, as well as innocent bystanders, so it's easy to imagine things turning into a "capital punishment" scenario.
My point is, for some people there is no limit to how far they will allow their emotions to take them, and in the calculus of things, if I am going to weigh the life of a law abiding police officer against the life of someone who has abandoned that limit, I'm going to take sides with the officer.