If a Newtown teacher had been armed and prevented many deaths...

That’s not how that law works. First, you need to be legally in possession of the weapon, which would not be the case here. Second, the law only means you are entitled to use deadly force in defense of an assault, even if retreating is an option. It doesn’t mean you can just shoot on sight anyone brandishing a weapon.
The correct answer is that, like Bernhard Goetz, that teacher could be tried and convicted of possession of an illegal firearm. They might get a light sentence, but they would probably still be charged.

If the teacher accidently killed a student with an illegal firearm, there could be a whole host of other charges

I think the DA would be obligated to press charges of some kind and accept some kind of plea bargain.

Sure there is: it’s called the duty to retreat, and applies regardless of the legality of the weapon at hand.

They should be charged and prosecuted, in my opinion. It should fall to the judge to then discharge (hope that’s the right word) , as in excused. I’m not seeing the problem really. Everyone would fulfill their obligations.

The real question for me is would the parents of the shooter be able to sue for wrongful death and get a payout?

You can sue anyone for anything. I’m not really sure what the basis of the claim you suggest here would be, though.