Just try to contain it. Breathe, think about what you would've said, and then think of any better way to say it. I understand that you want to stick up for your friends, but sometimes it's better for them to do it on their own. If they are having trouble, say to them: "Report them, ignore them, block them. Do anything you can,". That's the best advice I can give you right now :)