The circumstance you give would not be grounds for justification. That said, there are multiple circumstances in which "self defense" would be considered an affirmative defense to your actions. I'm particularly referring to New York State Penal law so it might be different where you live but if it's in the US most states have similar laws, though some of the circumstances may vary.
Now here's the thing, it's an "affirmative defense". So just say you are in a situation where you "reasonably believe" your life is threatened by someone else and you defend yourself by taking the life of said individual threatening you. You may, and most likely will be, still arrested and charged with a homicide-related crime. Now based on the circumstances of justification you can defend yourself with those circumstances and if it is, in fact, true, you will not be guilty of the charges. In many of these instances, it wouldn't even go to court but you would still have to deal with the trauma of the initial situation and aftermath.
The big things to consider is that "reasonable" factor. In law justification is often determined by if someone's actions would be considered acceptable by a "reasonable person". Notice how subjective a term "reasonable" is. That's why there are so many issues surrounding this topic, it's basically a big clusterfuck and dependant on the body of peers you refer to.