Here's a good explanation of why jealousy and pride in humans is sin and why it is good in God.
"People sometimes have trouble thinking that jealousy is a desirable attribute in God. This is because jealousy for our own honor as human beings is almost always wrong. We are not to be proud, but humble. Yet we must realize that the reason pride is wrong is a theological reason:
It is that we do not deserve the honor that belongs to God alone (cf. 1 Cor. 4:7; Rev. 4:11). [italics mine]
"It is not wrong for God to seek his own honor, however, for he deserves it fully. God freely admits that his actions in creation and redemption are done for his own honor. Speaking of his decision to withhold judgment from his people, God says, 'For my own sake, for my own sake, I do it...
My glory I will not give to another' (Isa. 48:11). It is healthy for us spiritually when we settle in our hearts the fact that God deserves all honor and glory from his creation, and that it is right for him to seek this honor. He along is infinitely worthy of being praised. To realize this fact and to delight in it is to find the secret of true worship."