This is the temper tantrum side of anger and frustration. Children get frustrated and upset when things do not go their way; and as with most problems, it is a matter of how much. The problem is not so much your child's reaction itself as it is how angry he gets and how he expresses his anger.
Help your child feel okay about being angry or frustrated; but at the same time, he needs to manage his anger better. Teach him more appropriate ways to handle his anger and frustration without your getting angry, without your threatening him. The key is for you to model more appropriate behavior for him.
With your preschool children, ignoring temper tantrums often works. They then come up with more appropriate ways to let you know how they feel. If tantrums still are their usual way of managing their anger and frustration by six to seven-years-old, though, they have developed an effective way to let you know when they are mad; and they have learned the wrong behavior. Ignoring them is no longer your best choice, were ignoring them even possible any more.
Whenever you can, avoid dealing with the temper tantrum while it is happening. Doing anything then frequently only makes matters worse. Tantrums take a lot of energy and can only last about so long; and your child cannot keep it up forever. Wait calmly until his anger lessens, and it will. You can then say, "You've used a tantrum to say something to me. I do (or don't) understand what you were trying to say. Here's my point. I don't do anything about things when told about them in such an angry way. Let's try again. If you want to say something to me and want me to do something about it, tell me more calmly. Help me understand what has you so upset. What do you want to tell me and what do you want me to do about it?"
Do not try to talk or reason with your child while he is having the tantrum. Wait until he calms. If necessary, leave the room or have him leave the room until he settles. Only after he is calmer should you ask about what is so upsetting for him.