Nietzsche's take on envy was sightly different, in that he saw it as a more noble form of honesty although one with numerous pitfalls. Nobody has everything they want and we should aspire to be honest when we see someone with a possession, a relationship, a skill or personal quality that we would dearly like but cannot (yet) have. For him, the opposite of this honesty about our shortcomings is a sour grapes denial of what we want accompanied by casting aspersions on those who have the thing we are unable to get ~ the rich are callous and greedy, the beautiful are dimwitted and shallow, the sexually active are wanton trollops etc.
Perhaps in one of his gloomier moods, Nietzsche suggested that modern democracies and the cult of individualism served to accentuate envy in a way never before seen. His explanation of this was that feudal cultures tell people to know their place and to aim neither up nor down - a consequence of this is that, whilst medieval peasants might have wished they could own the warm cape worn by the local aristocrat, they were resigned to a worldview in which God had put them in their station for some reason and so to entertain a certainty that one deserved to have what someone higher up the social scale had was a level of presumption on divine order that few would engage in. Democracies encourage people to think their opinion counts for just as much as the views of people with greater authority. Individualism likewise encourages people to want to improve themselves by acquiring new possessions, skills and so forth. We could add capitalism as an ideology that has a vested interest in convincing people at all levels of society that they should be parting with their earnings to acquire more and more, that they deserve to have things. I would also add growing literacy as an important factor in this change of mass psychology. The heretical movements of a thousand years ago pushed people to think outside the orthodox teachings of the Church. Regardless of the individual beliefs of Cathars, Bogomils, Free Spirits, and all the rest, a consequence of heresy is to teach people (frequently very poor people) that their opinion on the mysteries of life is better than the theoretically expert opinions of generations of cardinals and bishops. The common ecclesiastic response to heresy at that point in history was one of "how very dare you", repudiating illiterate peasants for having the presumption to think they knew better than those at the top of the educational system. In many respects this has not changed in the 21st century, though it is now secularised with the highly educated replacing bishops but still assuming their received wisdom of the world must be superior to the working classes when it comes to the new shibboleths of international politics, science, social engineering and so forth. The reactionary backlash around Trump, Brexit, notions around gender politics and the like might be considered comparable to 11th and 12th century farm labourers turning their backs on the prelates and deciding the Cathars made more sense.
One consequence of ordinary, uneducated people feeling they might know better than the highest in society was their wish to read the Bible themselves rather than having rely on anyone - not even the leaders of their favoured heretical movement. The urge to read scripture was the central driver in the wish to spread literacy and, in due course, to the urge to invent the printing press (well, the western one - the Chinese had already invented their own). The press had a ready market that expanded with each generation and each innovation that lowered the cost and made literature more accessible. Once people could read and form opinions about their own copy of the Bible, they immediately wanted to know about other topics and have opinions on those too. The more adventurous people became in their thought processes, the more socially restless they became, and the more they felt the right not just to admire what others had but to try and get it for themselves. Where there is a sense of equality of opportunity, Nietzsche effectively argued, there is room for outrage when it fails to lead to equality of outcome. Where we are convinced that the happily married person does not deserve to be loved by the person we wanted for ourselves, or the rich do not deserve their wealth, or the contented their peace of mind, there emerges the wish to destroy what they have. For some people (what feels like a growing number, but that may just be my cynicism) even if they could attain their desire by putting in more effort, there is a greater satisfaction to be had in ruining another's pleasure.
Invidia can be expressed not just towards possessions and relationships but also to states of mind - resentment that another person is happy, in love, has faith, hope etc. Observing groups of people on social media debating politics, religion, art, even just favoured TV shows it soon becomes apparent that plenty of people deeply dislike seeing others finding solace, enjoyment, spiritual fulfilment, inspiration, or anything else which they have yet to find. Being able to stomp the happiness out of someone seems to be an ever more popular hobby.
For Nietzsche the best response to envy of what others have is to honestly admit it, to take note of what we envy as a guide of what we are moving towards becoming (if the opportunity arises and we make the necessary effort to seize it) and, if we ultimately fail to get what we want, to show some dignity in resigning ourselves to it. What we should avoid doing is loathing others because they achieve what we miss, or denigrating the thing we crave in a dishonest moment of bitterness. We might also add that it would be worth reflecting on why we crave something, because it may not always bring us what we hope for.