As usual, your aversion to the death penalty has you selecting extreme examples. I never said that killing anyone was more or less reprehensible than killing anyone else. To my mind the question revolves around the threat to society. A man who kills his wife, whether premeditated or not, is not likely to kill other people randomly. Certainly, he should be imprisoned for life, no parole. But he is not a threat to society.
While I have a hard time thinking of how one could "inadvertently or accidentally" kill a police officer while committing a felony, naturally circumstances must be taken into account. But remember: in the US at least, when you commit a felony you are responsible for ALL outcomes of that crime. If you cause the death of ANYONE, whether by design or by accident, it is still felony murder. If you deliberately shoot a police officer you are, by my definition, a serious threat to society, and deserving of the death penalty. Not "pour encourager les autres", but for the protection of the rest of society.
Here, too, the police are public servants. I have never had one call me "buddy". They have always referred to me as "Sir" or as "Mr. Thorne" once they have learned my name. But by the same token, I give them my full respect, because of the job they do, and I refer to them as either "Officer" or "Sir".