You gotta hand it to MadMac, he cuts right to the chase. And I agree with him.
We have a God given right, and a legal right in all 50 states to employ lethal force to defend against death, or crippling injury.
However, I will say, that in all states, prosecutors have what's called prosecutorial discretion. And that some states are out and out governed by insanity.
In my state, we have castle doctrine and you would certainly be good to go shooting in your home. And to address one of the questions by the OP, the law provides immunity from civil suits by the bad guy or his heirs/estate. As a matter of fact, the law stipulates if forced entry is made into your home, you may assume it's a deadly force situation whether the person is armed or not.
I don't know about Mass, NJ, Maryland, and other places. They are a few of the places which seem to be governed by insanity. So, while there may be no criminal charge against you for using lethal force, they may allow the family to sue you civilly for everything you own. And they (the government), would probably have a big smile on their face while you are getting sued by the dead guys family.
It pays to know where you stand in your state.