I learned to recognize self abuse coming on but sometimes am so out of my mind like exhaustion, food allergies and stress that I do not stop in time.
Your child should not get to the point of a 4 hour meltdown. Preventative measures need to be taken before the meltdown happens. Education is very important and you and her need to learn to recognize and plan for meltdowns so as to lessen or prevent them. Bookworm has mentioned some things.
She may want to play another hour on a game but you and she have to stop the game before she is having a hissy fit that becomes a meltdown. She may seem energetic and bouncy but be near her breaking point. She might not tell you that she is uncomfortable in a situation and hide that discomfort until she has a meltdown. In public you can give her a toy to play with or something to use up nervous energy. Avoid the mall on busy days so she is not stressed is another. Keep her stress and exhaustion to a minimum. Slowly build up the stress and get her used to dealing with stress.
As a self abuser I can say that the helmet would not work as the kid would keep beating on the helmet and hurt her hands instead. As a kid I would slap my head and say i was stupid. As an adult I would hold a knife to my arm and yell at mom to stop it or else as that knife represented the pain she caused. Now i still have meltdowns when tired or sick. I tend to break things, bite myself or worse hit walls when mom is involved. I got scars from one time i keyed myself. Recently I came home in a meltdown and just said no. I saw it was a meltdown and stopped before I could not stop. This morning was bad so I took a nap. It took me over 45 years to finally recognize and learn to deal with my "tantrums" or meltdowns.
I love to wrap up in the blankets snug. There is something about being held tight that is calming and comforting. Sorry if this upsets anyone, been hiding a lot of things a long time. sigh.