...Its only self-defense if the self-defense is lawful. You have no legal right to resist the lawful actions of law enforcement....
However, in the world of reality, this is is a question of fact for the jury to decide. There are no absolutes in a case like this. The Jury will be asked to put thethemselves in the shoes of the man who killed the cop, and under the circumstances as perceived at the time, would a reasonable person have fired at those breaking in.
There are no easy answers.
My statement is accurate, though incomplete. Self-defense is "lawful" if you are reasonably in fear of an imminent threat that would cause severe or fatal injury. Cop's actions are "lawful" if they have a legal reason to be going after you and they use appropriate force in the arrest. A person can conceivably legally resist arrest if the cop is using force that is likely to cause severe injury or death, but that's obviously a very rare situation.