I don't know what I'd do in that situation. Lord willing, I'll never have to face it.
That being said, I hope that I would still have my faculties in order enough to not make any hasty decisions. Is it wrong to defend yourself and the lives of those you love in a setting of war (which I think it's fair to say that this could be categorized as)? I would say "no". Then you will say "ah, then you've contradicted yourself because you said killing is always wrong". I would respond with saying that God commanded the killing of many people in the OT, yet he also commanded "Thou shalt not murder". So if you think there is a contradiction in those statements, then take it up with God, because I'm only aligning myself with what He taught.
But the question to ask here is "Is there a better way?" You've already stated that the only way to prevent him from killing me and my family is to kill him first, but if I'm in the situation, I won't know that. So as far as I know, if I calmly talk to him, he may put his gun down. Is it better for me to kill him and (unless he is saved) send him to hell? Or should I have compassion on him and hope to point him to Christ? I would say the latter is better. But what if he does kill me? Well, here again, I believe in the sovereignty of God. This must have been His plan for my life. Why? I don't know, but God's way is perfect. My wife and I are both saved, so we end up in heaven (that's not so bad). God will deal with my kids as He chooses. Maybe, in all of this, the murderer gets caught and sent to jail where he meets some Christians he otherwise would not have met, and they are able to lead him to Christ. Are the lives of myself, my wife, and my kids worth one soul coming to Christ that otherwise would not have? Yes. Absolutely.