Exodus 20:5 For I, the Lord, your God, am a jealous God.
When the Lord is giving Moses the 10 commandments he states that he is a jealous God. This takes me back for a second. Jealousy is supposed to be a negative thing. Not something that God would be. This seems like quite a contradiction but when you look into it more you see that it makes perfect sense. When you look at the footnotes for this verse it says "Jealous: demanding exclusive allegiance, such as a wife must have for her husband." This makes more sense. We only have one God and we should not pretend that we have other God's that we are worshiping. God is not being selfish or envious he is simply expecting what is rightfully his. He is the one true God so he doesn't want his people worshiping other Gods. This is not sinful jealously but a jealously out of love.
We can see this same relationship between a husband and wife. The love between a husband and wife is exclusive. When a husband expect his wife to not love another man his jealousy is not sinful but out of love. Just as a husband expects his wife to not love another man, the Lord expect his people to not love and worship other gods.
Here are some Christian sites that discuss this topic and helped me to better understand it.