I'll try to be as non-judgemental as possible, but with physical altercations, you do need to restrain, but not physically harm. Let them know that you're not going to let them hurt anyone, or break anything. Ask them "what can we do to calm down, and how can I help you with that?" 

you need to let them get to their calm place on their own. This will help them with self regulation. When they're calm, talk to them about why they were acting out, and how they got to that headspace, and what we can do in the future. Talk to them about the repercussions of their actions. Make the punishment a natural consequence of their actions. Logical consequences (despite the name) are confusing to kids. This is why physical punishment is ineffective. You're expecting a child to make unrelated connections, with the hopes of building logic into their actions, instead of allowing natural consequences to occur. 

This practice requires consistency and time. By all means, this is a very neutered explanation, based on RIE parenting methods.