There are only so many hours in the week, only so many years in a career, and thus there's a limit to how much more one person can work than another. And yet there are people making 2x, 10x, 100x, 1000x, …, 1 billion times what others are. Compensation is largely unrelated to the amount of sweat, time, and effort we put in. Rather, it's a result of the depth of the value we provide and the number of people we provide that value to. Outcome > input.
I believe that understanding this makes us less jealous of people who seem "undeserving," and also helps us make better decisions in our own careers.
Another way to reduce envy is to realize that, ultimately, it's luck all the way down. There are plenty of talented, hard-working people who will never see even moderate success, simply because they were born in the wrong country, in the wrong decade, to the wrong parents, etc. It seems that cursing the people above us is a natural tendency for humans, but we'd do well to spend more energy thinking of those behind us, as well as appreciating our own circumstances.