No, it is not sinful to kill someone in self-defense as long as you are defending from a fatal attack. Your life is a great good that should be protected, even at the expense of the life of someone who wants to kill you.
This subject concerns the right of a private citizen to apply force on anyone who unjustly attacks their life. There may be a few different opinions as to details regarding some slight practical points concerning this topic, however, most moralists agree on the morality of the main principle.
Everyone has the right to protect and defend their lives against the attacks of an unjust attacker and are allowed to employ whatever force is necessary to achieve this. It is the right of a man to defend his bodily integrity, as this is part of the good of life, it can be defended in the same way as life itself. However, it is important to note that no more injury may be afflicted than that which is necessary to thwart the attack. If someone can be avoided who wants to take our lives, that should be a better option. If defense can be achieved by reporting to the authorities or calling for help, or if the plans of the unjust aggressor can be thwarted through the use of any other means, those should be selected instead of lethal force. As long as we’re certain other means would work.
You cannot kill to defend against a slap or a minor injury, but only to defend your life and that of those around you especially those who depend on you, or who you are charged by law to protect.