I was a successful kid. I was the valedictorian of my high school class. I had my pick of the best colleges in the country. If you'd have asked anyone to guess who'd grow up to be the most successful person in my circle, most people would have guessed me. I was "successful" at that age because I was smart, but more important, because I literally did nothing but study, study, work, and study some more. This was a fantastic strategy for succeeding in a highly structured, grade-based environment. Unfortunately, the world is not as highly structured. The world doesn't give you letter grades. In school, there is a direct correlation between effort and reward. In life, the correlation is certainly there, but it's indirect and messy. Luck also plays a big role.
Flash forward to today. While I am modestly successful, I am far from the most successful person I grew up with. Two of my elementary-school friends are huge movie stars (one of them has been Oscar-nominated, and will probably win at some point). One of my high-school friends is a phenomenally successful musician, who also stars on a highly rated TV show. One of my early colleagues, from when I was fresh out of college, is now the #2 production executive at the world's most successful movie studio; his name is listed in the credits, as Executive Producer, of almost every $1B+ movie released in the last six or seven years. Many of my friends are TV writers, and some of them earn millions of dollars a year. (In case it's not clear at this point, I grew up in LA!). At least one of my friends is a tech entrepreneur worth close to half a billion dollars. An ex-girlfriend (ouch!) was an early Google employee.
These people make me jealous as fuck. I'm not going to lie about it, and I'm not going to sugarcoat it. If you're the competitive type, you'll always feel a pang of envy over the success of your peers. Doubly so when your peers are successful beyond their wildest dreams (or yours).
The first thing I'd recommend is accepting the jealousy, and recognizing it for what it is. If you're a smart and introspective person, you won't be able to bullshit yourself -- to will the jealousy away through new-agey mantras and mind tricks. Instead, try to mine the envy for productive lessons. What about these people made them as successful as they are? Are there any operative takeaways for you?
Second, and much more important, is learning to be genuinely happy for the success of others. Especially the success of your dear friends. First, because it's awesome when good things happen to people you like. Second, because even from a highly cynical standpoint, wouldn't you rather be friends with all these fabulously successful people? I don't know about you, but it does me absolutely no good when my friends are struggling. Schadenfreude is a terrible investment strategy. Its ROI sucks.
I'd also recommend some light reading on the concept of "EQ" and management of emotions. Emotional self-regulation doesn't always come naturally to me. I had to study and practice. Like everything else in life. Most of the literature will tell you that there's no use in hiding from, avoiding, or pretending your emotions don't exist. Acknowledge them, be mindful of them, and actively attempt to short-circuit them, to channel them in more productive directions, or to move to their adjacent (and often more beneficial) emotional correlates. Jealousy, for instance, seems somewhat adjacent to ambition on the emotional color wheel. When you find yourself feeling jealous, don't try to make the leap from jealous to happy. It doesn't work that way. Instead, move from jealous to driven.
Finally, some of the best advice I've received on the topic of envy comes from pop culture: "Do you." You can't control whether your best friend wins the lottery, or your second cousin sells his startup to Facebook. You can control what you want to do, and how you're doing it.