It doesn't matter, the school will side with the parents, and the parents will call for that teacher's head on a silver platter, even though the kids started it.
It looks like he was baited, and then snapped when he couldn't take it anymore.
I would have just walked out of the class room, and gotten the dean. I also would have pressed harassment charges on the students. I would go for a psychological evaluation, and then sue both the school and the families of the teens for emotional and psychological distress and make sure that they supported me financially for the rest of my life.
Seeing as how, I can no longer work, and they caused me to snap in the first place. I think that is the only way to teach these assholes a lesson, because often enough, if the teen is bad, then the parents are worse.
I honestly don't know why kids think it is funny to give the teacher a hard time. I mean, you are only hurting yourself in the long run.