You are doing the right thing, but a good dose of consequences will help too. Remove yourself or the object of frustration. Don't just ignore it or say "no." If he hits you, say "No hitting" and plop him down and walk away. If he hits/throws a toy, take the toy, "No nice hands." When he calms down, look at him and say, "Good calming down. Say sorry. Use nice hands."
In terms of him doing it to himself, kids do that when they are really tired, so be wary of letting him get overtired. Mostly, say in a diaspproving or sad voice, "No, ouchie." Vocalize for him, put words to his emotions, "You are mad/sad/tired, aren't you? Use nice hands. Hug Mommy instead." You could try to busy his hands or pet them to distract him.
My oldest (5 years) never hit. But her little sister is 19 months and will push to get my attention or hit if her sister is in her space. I always say, "No hitting. Say sorry." (She knows to sign sorry) And I make her kiss her sister. She also knows that "nice touching" is soft petting becasue I demonstrate and she copies me. Keep in mind it is "petting" not "patting" which can quickly turn to hitting. It worked after 3-4 incidents. And now is infrequent, ussually when she is tired. So another trick is to avoid frustrating situaitons. Put a tired baby down for a nap, or at least a change of scenery, rather than have a battle.
It is normal for kids to try this as toddlers, but with some consistent response it should not persist past a few days/weeks. It may return as he is an older toddler and preschooler and tries to test you or other caregivers, but again using a consistent response should work. I see no reason why it would foreshadow problems of an older child. But there are pareents who don't deal with it or chalk it up to "boys will be boys." I believe parents who never teach their kids to manage frustration cause some of the school age problems you might see in your child's peers.