Helping your child through a freak-out that has been caused by a compromised state includes juggling between finding a way to reduce the compromise and handling the melt-down. Being "compromised" means when a child is upset due to hunger, thirst, sleepiness, lack of rest, or overstimulation.
The trick is to identify what is compromising the child and sneak in a solution to that weakened state, while at the same time not activating a power struggle.
Big, wild, emotional reactions from children can be cause by a few different conditions. Sometimes the child feels fear, anger or sadness and needs to release that or sometimes the child has learned that freaking out works (that she will get what she wants if she blows up.)