Step one is to understand why the child is "freaking out". Chances are pretty low that your child has a desire to cause you frustration. But it's hard to really feel their point of view when you do so much for this little person and they are literally throwing their shit at you! Consider also that you are sleep deprived, pressed for time, stressed out about money, fighting with your mate, etc., and it's amazing that you have any patience! But you love this little person with all your heart and you know it might just be the most important job you will ever have. So you dig deep and you find your cool.
Back to trying to understand why your child is screaming so loud, a red haze of anger is beginning to fill your vision, and you feel as if your head might explode. [Here I'm going to only mentionself empathy because you may not have time to give it to yourself in certain situations. But I do want to stress how important it can be!]
What if children have the same needs for respect, choice, and power over their environment that we adults do? If they do have those needs, then think about all the times, every day that we disrespect our kids by interrupting them, controlling them, forcing them to wake up, go to sleep when we say, eat what and when we say, go to school, etc. when we want those things done.
How would you feel, as an adult, being controlled to that extent?
It is no wonder kids have "tantrums" and we are at a loss to figure out why. We are thinking of them as 2nd class citizens instead of humans with important need/desires. I highly recommend reading the book Nonviolent Communication by Marshall Rosenberg (NVC), which shows a whole world inside of us all that, once seen, is easily understood and provides a clear path to empathetic connection in all our relationships. For now on I'm going to refer to need/desires/values as "needs", not to be confused with the basic life needs for shelter, air, Internet bandwidth, and food.
I understand that from some perspectives the parenting I'm advocating seems like permissive parenting but it is not. Any time I advocate for recognition of a child's needs, I want to be clear that recognition does not automatically mean we must meet the need. Sometimes it is a good idea to do so, yes, but other times just recognizing the need out loud may be enough. [Side track: Here, at the point where we examine needs, is where we might often find an opening to allow natural consequences to be learned.]
For example, when a child really wants a thing that you can't or won't give, it is often enough just to guess at and state the need: "You really wish mommy had time to take you to Disneyland!" Or "Do you have a powerful desire for play right now?" Or "Do you want more say in decisions that affect you?" Or "I bet you wish we could play video games all day long!" [Disclaimer: this is not a magic bullet but with patience and consistency, and sometimes, repetition, you will be surprised how well it works.]
Here's an example of a mother using needs recognition to deal with her son who wants to keep playing video games when she has a different plan:
So yeah, we can stand our ground while still empathizing! To truly hear and honor a child's needs is not to spoil the child. Earlier I mentioned "self empathy". I want to give it another plug here. Odds are you have heard this before: You must first be healthy in order to raise a healthy child. And if you go past recognition of their need into fulfilling their need at times when they would benefit more from doing the thing for themselves or trying and failing (we need failure in order to learn and grow), and/or, if you don't at least share out loud what your needs are, much less meet some of them, you might just be raising a prince or princess who will move on from ruling you and your house to attempting to rule others. I know, again, I barely touched on self empathy. Get the NVC book. You won't regret it.
Finally, I invite you to think about the many benefits of focusing on needs: (1) The child is learning a habit and language for expressing their needs! This is beneficial for the child and for everyone who deals with that person their entire life! (2) Your bond with the child will go deeper and include more trust! (3) You are exercising your own "empathy muscles", which will benefit all your relationships. (4) You are contributing to overall peace in the world. A person who grows up to deeply know themselves will not be easy to dominate and compassion for others will be automatic and natural!
Imagine the following situation:
Bully approaches your child with, "Hey dork! You made me look 'tarded in class today. Do you want me to pound your face in?"
Child used to identifying needs responds with empathy, "Oh. I'm guessing it is frustrating when your strengths are not recognized?" Here's a short animated comedy skit I made to show a little girl using empathy to reply to her bullying brother: