Now add a reason that doing this kills the criminal's innocent son. He left his son tied up at home, and was planning to untie the kid when he returned, but he never got home, and the kid wasn't found in time and starved to death. Or the man actually was a good father, but he and his son were involved in a dangerous project, and he would have been fine, but now without his father's help, he is killed.
So, defending yourself caused an innocent to die.
But it wasn't wrong of you to do that. The fault lies with the criminal. He is responsible for getting himself shot by breaking into your house and trying to rob and murder you. And because getting himself shot is his responsibility, so are the consequences. He got his own son killed, not you.
Agree so far?