Specifically "comparison" sounds to me like (i.e. it reminds me of the doctrine about) one of the 'fetters', i.e. "conceit" -- see this answer -- then see also this Wikipedia.
I think the opposite of mudita is meant to be "envy" -- so see issā where that's identified as one of the "unwholesome mental factors" etc.
As for getting over it, it reminds me of this, quoting from A Still Forest Pool -- Lessons in the Forest
A Western monk at WatBa Pong became frustrated by the difficulties of practice and the detailed and seemingly arbitrary rules of conduct the monks had to follow. He began to criticize other monks for sloppy practice and to doubt the wisdom of Achaan Chah's teaching. At one point, he went to Achaan Chah and complained, noting that even Achaan Chah himself was inconsistent and seemed often to contradict him self in an unenlightened way.
Achaan Chah just laughed and pointed out how much the monk was suffering by trying to judge others around him. Then he explained that his way of teaching is very simple: "It is as though I see people walking down a road I know well. To them the way may be unclear. I look up and see someone about to fall into a ditch on the right-hand side of the road, so I call out to him, 'Go left, go left' Similarly, if I see another person about to fall into a ditch on the left, I call out, 'Go right, go right!' That is the extent of my teaching. Whatever extreme you get caught in, whatever you get attached to, I say, 'Let go of that too.' Let go on the left, let go on the right. Come back to the center, and you will arrive at the true Dharma."
Re. Ajahn Chah's laughing, thoughts like "he got this and I got nothing" doesn't seem to me the kind of mental habit that a forest monk has trained towards.
The suttas say -- and Ajahn Chah too says, in this quote -- that Buddhism is more about "letting go", rather than about "acquiring".
This article Letting go reminds me that among the first training recommended for a layperson might be acts of generosity or dana.