Some of how you deal with this depends on how otherwise you are raising/disciplining/etc. your child. If you're doing time outs (1-2-3-Magic etc.), versus if you're doing punishment-based discipline, versus if you're doing non-punishment discipline (Parent Effectiveness Training etc.), there will be some differences.
However, the core will be the same.
- Problem 1: Your son didn't stay in his room when asked
- Problem 2: Your son yelled at your wife.
- Problem 3: Your son yelled at you
Each of those needs a separate resolution. First, if your son needed to stay in his room and he left, he needs to return to the room. Second, he needs to apologize to your wife. Third, he needs to apologize to you. All three things are necessary for bringing the relationships back into balance. The order isn't important, but the three things are. You can't return to normal relations between the three of you until all three are addressed.
As far as how you accomplish that, this is where it can vary; I'll give my (non-punishment-centric) approach.
Your son needs to understand that yelling isn't the right option when he's unhappy with something he's asked to do. Break down why.
- It hurts his mother's feelings
- It does not convince his mother to change her mind - it if anything makes her more likely not to
- It creates an adversarial lose-lose situation
Then talk to him about why he yells. He's old enough to answer - or at least, in the Socratic method (prod him with helpful questions that lead him to understand the answer). Some possible reasons:
- He is upset that he has to do it
- He is venting his frustration
- He wants to change his mother's mind
Finally, move on to helping him figure out what he can do to constructively deal with those issues.
- Use his words in a calm manner. Tell his mother that he doesn't want to do it.
- If calm isn't really possible, vent his frustration at inanimate objects in a safe, nondestructive way. Stomping his feet. Clapping his hands. Something that's not directed at a person - thus, doesn't make someone hurt or mad - but gets out that rage.
- Once he's calm, he should explain to his mother why he doesn't want to do it, with specific details; and if he can think of a compromise, he should suggest it.
Also, explain that sometimes he still will have to do things he doesn't have to; everyone does - you go to work, you pay taxes, etc. - but that you and your wife will take his feelings into account, and when it's possible to change things in a way where he doesn't feel as frustrated, you will. If you're telling him to go to his room because you have adult company over and you want a child-free couple of hours, maybe he can get out a toy he normally doesn't have out; or maybe he can call a friend and go to his/her house. You have to play along here also - if there is a reasonable compromise, you should try to reach it.
Your son needs to know the correct response after he's yelled at someone.
He's going to yell sometimes; that happens. You probably yell at him too sometimes, even if you're very careful with your temper - I do, my wife does, and we're very calm people who try very hard not to lose our tempers. Sometimes we do, though. When we do, we apologize for yelling as soon as we can - often immediately as we realize we lost our temper right away. It doesn't matter why we yelled - if our 3 year old bit our one year old's arm - still not okay to yell. So we apologize. Then we address the reason we yelled, separately.
Assuming you do this (or start), the conversation should go something like this.
Son, when you yell, you hurt your mother's feelings, and my feelings. When you've done that, it's necessary to apologize to the person whose feelings you hurt, and give them a hug, to show them that you still love them. Even if you're still mad at them, you need to do this, because no matter how mad we might be at each other, we're still family, and we need to show that we love each other.
I don't want to. I hate Mom. She's mean to me.
I understand, but you still need to apologize for yelling, and give her a hug. I know you don't agree with what she told you to do, and that's perfectly okay. You don't have to agree with her or like what she tells you, and it's perfectly okay to be frustrated and mad. However, yelling at someone is not okay. Let's find another way to deal with that frustration. Before we do that, though, you need to apologize for yelling, because until you do that you can't begin to repair your relationship with your mom.
I don't want to! I didn't do anything! She's mean!!
I know you feel that way, and I'm sorry you feel like your mom is mean to you. She loves you and doesn't intend to be mean. We can definitely address your concerns and try to help find a resolution that doesn't leave you frustrated and upset. We can't do that, however, until you apologize. When you don't apologize to someone you hurt, you leave them hurting until you do apologize. When your mom and I have a fight, we always apologize if we yell at one another, even if we aren't happy still; we know we love each other, and it's very important to take care of each other's feelings even if we are mad. Apologizing is a very important part of that.
Something like that: one, keep at it until he understands - even if it's an hour - and engage his concerns when you can. If he's just saying "I don't want to" and nothing more, you're going to have a hard time, but it is possible to get past it most of the time. The point is to make sure he understands that the apology is solely for the yelling itself - it's not a concession of guilt or an admission that she's right; it's not giving up ground. It's solely addressing the harm that was done by yelling itself.
You also should be giving him examples of others' behavior, particularly yours, in these situations. Modelling good behavior for your son is vital - as that's the main way he learns his own behavior - and in return, showing him your good behavior is crucial in moments like these so he can see it is in fact possible to make up even in these situations.
With all of that said, some of this may also require you and your wife to find better ways to deal with your frustration at him. He is a seven year old child, and is going to be very frustrated when he doesn't feel that he has any say in what happens to him or doesn't have control over his life. Of course, he's seven, and doesn't practically speaking have a whole lot of control over his life - but it's frustrating nonetheless.
Him yelling and being upset because he's not able to choose to be in whatever room he chooses shouldn't be a surprise - and you should be prepared to accept some level of frustration from him, as long as it's not (too) personal. You should make clear to him what the boundaries are - what are okay ways to vent frustration and what aren't - but you need to make allowances for that frustration.
A lot of problems we have with our eldest child are because we don't expect his frustration to bubble up in the way it does; as we've spent more time thinking about our own parenting style, we've realized that we have a very emotional guy, and we have to help him let out some of those emotions, while not taking personally when he's upset. Reacting to his venting with calmness, without losing our temper or being visibly upset, will help him calm down - especially if we make it clear we're taking his frustration seriously, but still are calm and not bringing our own emotions into it.