Has there ever been a successful defense based on "self-defense" in a case of a person charged with killing an on-duty police officer?
england-and-wales
YES
Detective Constable John Fordham was on duty when he was killed by Kenneth Noye, a career criminal, who was found not guilty of his murder by successfully claiming self-defence.
John was carrying out covert surveillance on Noye who was suspected of (and later pleaded guilty to) laundering gold bullion stolen during the Brink's Matt Robbery near Heathrow Airport in 1983.
Noye stabbed John, who was wearing a balaclava and camouflage clothing, when he found him in the in the garden of his home in West Kingsdown, Kent.
Noye's criminal associate, Brian Reader, was present when John was killed and was also found not guilty of murder but his defence is not not available. Apparently "A police source told The Mirror (newspaper) they believe Reader had nothing to do with the killing."
This report (about Reader's involvement in the Hatton Garden Burglary) includes this account of John's death:
In the Kent countryside 31 years ago, two criminals stood over a man slumped on the ground as he took his last breaths.
Over the incessant barking of dogs, shouts could be heard across the chilly January night. One, carrying a shotgun, shouted: “Right, we’ll blow your f***ing head off!” He was Kenneth Noye.
The other, Brian Reader, aimed a kick at the man: John Fordham, a specialist police surveillance officer, who had been stabbed five times in the front and five times in the back, with such force that a knife was plunged into his body up to its hilt.
Experts would later tell a trial that Fordham had been held down for some of those stab wounds, inflicted by Noye – then a king in the criminal underworld –that night in 1985. His trusted partner was Reader.
Fordham was part of the Scotland Yard team keeping watch on Noye as part of the investigation into the Brink’s-Mat heist of 1983, when £26m in gold and bullion had been stolen from a warehouse near London’s Heathrow airport.
Both men stood trial for murder but were cleared, with Noye claiming he had acted in self-defence, fearing an attack from Fordham ... both Reader and Noye were convicted over the gold, and Reader was jailed for nine years in 1986.
This case is quite old but it is still used today as an example of how quickly things can go horribly wrong, and the need to ensure that proper planning and risk management / mitigation is in place