My daughter was a tantrum-thrower when she was 2 & 3 years old, too. What usually worked was to pick her up at the beginning of the tantrum and put her in our spare room (where there were no toys for her to throw), and let her scream & pound the floor to her heart’s content for a few minutes. I wanted her to know that it’s okay to be angry but also that it’s not acceptable to hit or throw things to get attention. She completely outgrew the tantrums by the time she was 4 as she learned to express her emotions verbally.
I think that one reason some kids are prone to throwing tantrums is because they’re frustrated at not being able to express what’s wrong or what they want. And also some kids would rather have negative attention than no attention, so they grab every chance to act up just to get a reaction.
Good luck with your little guy–he WILL grow out of this (eventually)!