Ibn Atik narrates from his father, who was a Companion of the Prophet (peace and blessings be upon him), that the Messenger of Allah (peace and blessings be upon him) said: "Among jealousy is that which Allah loves and that which Allah dislikes, and among pride is that which Allah loves and that which Allah dislikes. The jealousy that Allah loves is jealousy where there is cause for suspicion, and the jealousy that Allah dislikes is jealousy without cause. The pride that Allah loves is a man's taking pride in himself for the sake of Allah at the time of fighting, and the pride that Allah dislikes is pride in oppression or wickedness."
Hadith Referenceالمعجم الكبير للطبراني / باب الجيم / 1760