All mammals, when distressed, move into fight, flight or freeze. We humans often do this even when there is no external threat, because the internal emotions of frustration, grief, hurt or fear tell us that it is an emergency and it FEELS like a threat to us. Those feelings are so uncomfortable. To fend them off, we lash out (fight), try to run away (flight), or try to make ourselves go numb (freeze).
So what you're describing is a normal toddler response to being distressed. He doesn't yet have a full developed frontal cortex, so his reasoning ability is just beginning to take shape. When he trips and hurts himself, it hurts! He doesn't yet have the capacity to remind himself, as we would, that the toy did not intentionally trip him. In the same way that we adults might curse at our car or computer when they fail, even though they have not intentionally hurt us, your son gets angry at the toy that "tripped" him.
This will all get better as your son gains language to express his hurts. You can help him by giving him language. "Ouch! That hurt, didn't it, Sweetie?" Hugging him is great. Empathize with his hurt, but stay calm to communicate that it isn't an emergency, which will help him to calm down. In fact, once he feels safe, he may well begin to cry. That's great, since those tears are helping him work out the hurt that was driving his anger. It's your loving, accepting presence that helps him feel safe enough to feel that hurt. Think of yourself as his "witness."
What about setting limits? Absolutely. Throwing toys could hurt someone, or break the toy. And hitting you is not okay, no matter how mad he is, because people are not for hitting. So if you can intervene quickly enough, you can put your hand on the toy to prevent him from hurling it, and say with compassion, "Ouch, that really hurt! You are mad at the toy, aren't you? You tripped on it. Here, I'll put this toy out of the way, okay? Toys aren't for throwing, but we will move it out of your way so it can't trip anyone."
If he hits you, you move out of reach and say "I don't want those hitting hands to hurt me, Sweetie." Don't move far enough away to trigger his abandonment anxiety, just far enough away to keep yourself safe. Or, you can hug him, keeping his hands from hitting you. Either way, empathize: "You are so mad...Oh, Sweetie, are you upset that you can't have that? That's dangerous, it's not for babies...You are so disappointed, aren't you?" He will quickly learn what these words mean. What's more, he will hear the empathy in your voice. And because you are making it safe, he may well crumple and cry, and show you all of those upset feelings that were driving him to lash out. As he does, the anger will melt away. Here's a post on helping kids past this phase of hitting us that might be helpful to you: http://www.ahaparenting.com/ask-the-doctor-1/14-month-old-hitting-mom
What you don't set limits on, of course, is emotion. It's normal for humans to feel hurt and angry, and you want to accept all his feelings. So I wouldn't use the words "Be nice." First of all, he doesn't know what that means. Do you mean "Please don't throw your toys" or "No hitting"? Then say that. Secondly, "Be nice" implies that he is not nice, at least not at this moment. I know you mean the behavior is unacceptable, but in fact a toddler IS his body and those feelings are so strong in his body, he can't distinguish. So "be nice" implies that what your child is feeling is not okay, when in fact what he is feeling is perfectly normal and unavoidable. Accept feelings, limit behavior, and the more specific you can be with your son, the better.
Hope that's helpful!