Shooting someone dead is clearly not a "good act", but it's trivially easy to describe circumstances (self-defense) under which it is ethically appropriate to do so.
Murder is not a good kind of act. Hence, murder is never justified. But a good kind of act can have evil results. An act of self-defense is a good kind of act, all other things being equal. Therefore, the death or injury of an attacker, as a result of an act of self-defense, is not necessarily unethical. If the act goes beyond what is necessary for self-defense, however, then it is no longer an act of self-defense.
-A8