Ibn Jabir bin Atik narrates from his father, Sayyiduna Jabir bin Atik (may Allah be pleased with him), that the Prophet (peace and blessings be upon him) used to say: "Among jealousy 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. Likewise, among pride is that which Allah loves and that which Allah dislikes. The pride that Allah loves is a man's taking pride in himself when giving charity and when fighting, and the pride that Allah dislikes is pride in oppression and wickedness."
Hadith Referenceالمعجم الكبير للطبراني / باب الجيم / 1759