When you personally are happy, it doesn't make any difference what others have. So the way to counteract envy is to increase your own level of joy.

By mastering joy, you will become free from envy.