There's a difference between pursuing what you want independent of particular concern for what others have, and pursuing something because someone else has it. The end result upon acquisition is entirely different. It's similar to fame or prestige in that sense, which are given to you by other people's often fleeting opinions, and are frequently torturous accordingly to the extent one cares about such.
Most people don't really want things until they think they are getting the short end of the stick.
This is quite common in the current us school system where children are routinely pitted against one another for the love of a proxy parent, aka teacher.
But you rinsight is still valuable: if you have difficulty getting over something, then remind yourself that you are being a like a drunk.
I don't think it's necessarily counterproductive.
Of course an all-consuming envy isn't good, but I think some degree of envy is human nature and not a big deal as long as you don't take it too seriously.
It can have an upside, if it becomes fuel to push yourself to work harder.