To be annoyingly pedantic the OP is dealing with two different emotions. Though they are often used interchangeably, jealousy and envy are not the same thing.
Jealousy is something that occurs when you feel your relationship is being infringed upon. Basically you become jealous when you think a rival is going to take away someone whom you feel is rightfully yours. That rival may also have qualities that incite you to feel envy, which is desiring something that someone else has. We feel envy when we compare ourselves to other people and to what they have. I might say I feel jealous when my boyfriend kisses another women, but I envy my sister's new ebook reader.
There are some arguments that jealousy is part of a build-in defense mechanism that alerts us to the possibility that a valued relationship is at stake. The problem is that jealousy can be incredibly intense - it can obliterate rational thought in some people and can set off a series of behaviours that end up pushing away the person you are trying to hold on to.
Jealousy is also connected to other personality traits, and studies have found that some people are more prone to it than others. People who have higher levels of some form of neuroticism - emotional instability, anger, anxiety and depression, tend to be more prone to jealousy. People who are more agreeable - co-operative and compassionate - are less likely to become jealous.
Interestingly, there was a report a few years ago from a study that found 40% of women deliberately provoke a bit of jealousy in a partner to get a reading on the strength of their bond. this occurs most often in the early stages of a relationship when jealousy has a correlation to to caring, so provoking it can be a way of testing to see if it's safe to invest more emotion. I'm not condoning this, I just think it's interesting.
Unfortunately our brains don't release just a little bit of jealousy but instead it tends to land with brute force and lends itself easily to obsession and delusion. Emotions give us an illusion of certainty, and so jealousy can make us certain of our perception of the world, which makes us less likely to engage in reality-testing. Such complex creatures we are.
Whatever the trigger, some psychologists argue that jealousy can be turned for good rather than destruction if people recognize it as a signal to look within and repair their own sense of self-worth.