Polearm Master should be usually better, but Spear Mastery has the potential to deal more damage on early levels
Both weapons will deal 1d10 damage on hit. Spear Mastery gives +1 on the modifier and allows you to use your Bonus Action + Reaction to attack someone who enters your reach, for an extra 1d10 damage.
So, let us consider a first round, with and without Rage (I will use +2 as the rage damage). For now, let us ignore the +1 bonus on the modifier from Spear Mastery.
PAM
On hit, you will deal an average (5.5 + 3 + [2]) on the weapon hit, then (2.5 + 3 + [2]) on the bonus action hit then (5.5 + 3 + [2]) on the reaction, for a total of 22.5/[28.5] (without/[with] rage).
Spear Mastery
On hit, you will deal an average (5.5 + 3 + [2]) on the weapon hit, and (5.5 + 5.5 + 3 + [2]) on the reaction, for a total of 22.5/[26.5] damage.
Surely, with the +1 to hit, the Spear Mastery will outdamage the PAM without rage, and, depending on the enemy's AC, may outdamage with rage as well.
But the thing is: most combats do not involve enemies constantly leaving and entering your range. With PAM, it is fairly simple to move one step back, and keep this type of control. On the other hand, Spear Mastery requires you to be at least 20 ft. away from the enemy when you use the bonus action. I have been playing a PAM Fighter and quite often I can not use my reaction, because enemies are not that dumb, and will find a way to dodge me, attack from range or whatever tactics that nullifies my reaction attack. As an example, many times, combats happen in dungeons where your movement is severely limited, and constantly kiting and being 20 ft. away will be a problem.
Finally, Spear Mastery is situational in the sense you need to call one enemy to target. If that one enemy does not enter your range, but all others do, you can not attack them, and your bonus action is lost.
So, when we consider the scenario that most likely is going to appear on a second round of the combat, with enemies already in range, PAM will deal two attacks, and Spear Mastery will only be a +1 bonus (although it does free your bonus action). In this case, PAM will always outdamage Spear Mastery.
There is also the problem of actually activating Rage: it costs a bonus action. With PAM, you are losing the 1d4 attack, but with spear mastery, you now can not use the reaction from the feat any more, as it requires both the bonus action and the reaction.
And, finally, PAM will get even better as you level. For every extra point in Strength (modifier) you get, the PAM will increase 1 more damage on hit compared to Spear Mastery, and the same for Rage Damage, same for Magic Weapons, etc., as PAM allows one more attack than SM.
For comparison, consider a 9th level Barbarian, with 20 Str and +3 Rage damage. SM is slightly better for ACs 22 or higher, which are not that common, and PAM is slightly better elsewhere, considerably better for low AC enemies (auto-hit enemies, AC <= 11). The figure is done considering you can actually use all your attacks.
Then again, consider how more situational the Spear Mastery is, and PAM should be the superior choice.
So, to conclude, Polearm Master is considerably less situational than Spear Mastery, allowing it to be used more frequently, and, as you level, it will become superior in every way. The only scenario I can see Spear Mastery being more useful is if you think you are going to face many enemies outside your range (and that you can not approach), in a way that constantly throwing your spear is something that will show up often. In my experience, this setup is very rare, so I would go with PAM.