I believe that staying with upset children, as long as we are safe physically and emotionally, gives them security. It also models the ability to control emotions when the situation calls for control.
I don’t believe children will “think about what they have done” when put in “time out” for “bad” behavior. Did you? After staying with the upset child, if appropriate, you could say, “I’d like to talk about what happened later.” This way, your child still feels connected to you and will have a greater chance of learning with your guidance.
When my teenage daughter broke a rule and I showed her unconditional love after expressing my disapproval, she said to me, “Why aren’t you mean like other parents? Why are you nice when I was bad?” Because I didn’t take her rule breaking as an attack against me, I didn’t get triggered into anger. Therefore, she was able to feel how her actions had broken our trust rather than focus on being angry with me. The ability to not get angry took control over my inner dialogue. I had to learn how to first pay attention to the thinking behind the upset. Then, during a calm time, I could make plans to alter my thinking when emotions started to flare. The practice was well worth the time and effort.
If anger doesn’t get the results you want, work on changing it. If you need to release your anger, share it with another adult so you can be calmer with your children. Try to have a partner who is willing to have you call them up for a 10 minute “emotional dump” without advice so you can think clearer. What a difference it will make to release your own pressure cooker first, then you can be emotionally present for your children. How close you will all become.