Oh, I get where you're coming from! If your child is in a safe enough place - you just need to walk away. Close the door behind you, if you need to keep separate - you can even hold it shut if they try and reach you. Just let them get it out. Initially, this will take some time. You can deal with the behaviour when they're calmer.
I found that any intervention, but especially those that involved touch or trying to soothe usually meant I ended up getting hurt, which elevated my anger and usually led to shouting, and sometimes saying things that weren't helpful. Then we all felt yukky. And the problem wasn't resolved.
If they're in an unsafe environment, pick them up, hold them tight (remind yourself this is a comforting cuddle, not a fight) and pop them into bed until it passes.
At the time, I know it's incredibly difficult - especially if you are on the receiving end of anything physical. But, walking away give you and the child the space to deal with this. Follow up when all is calm with a couple of quick statements - one should show empathy - eg - "You must have been very cross/sad/angry to have had such a big tantrum, but we don't (insert inappropriate behaviour description here)". Leave it at that - stay calm, reduce the opportunity for negative attention seeking, and best of luck to you. I must admit, though, I'm only successful at taking this approach 90% of the time - although, I have a lovely friend who always reminds me that I tend to react negatively to only the most extreme behaviours, and that it is fine for kids to figure out that you have a snapping point.