The Messenger of Allah ﷺ said, "There is a kind of jealousy that Allah loves and a kind that Allah
hates, and there is a kind of pride that Allah
loves and a kind that Allah
hates. As for the jealousy that Allah
loves, it is jealousy when there is genuine cause for suspicion. The jealousy that Allah
hates is jealousy without any cause for suspicion. The pride that Allah
loves is a man's display of pride in himself during battle and when giving charity. The pride that Allah
hates is pride shown in vanity and falsehood."
أخبرنا إسحق بن منصور قال حدثنا محمد بن يوسف قال حدثنا الأوزاعي عن يحيى بن أبي كثير قال حدثني محمد بن إبراهيم بن الحارث التيمي
قال رسول الله ﷺ إن من الغيرة ما يحب الله عز وجل ومنها ما يبغض الله عز وجل ومن الخيلاء ما يحب الله عز وجل ومنها ما يبغض الله عز وجل فأما الغيرة التي يحب الله عز وجل فالغيرة في الريبة وأما الغيرة التي يبغض الله عز وجل فالغيرة في غير ريبة والاختيال الذي يحب الله عز وجل اختيال الرجل بنفسه عند القتال وعند الصدقة والاختيال الذي يبغض الله عز وجل الخيلاء في الباطل
[Its isnad is hasan] Abu Dawud narrated it in jihad, chapter on pride in warfare, and Ibn Hibban graded it sahih, no. 2659, from the hadith of Yahya, with the same wording. It is also found in al-Kubra, no. 2339, no. 1313, 1666, and Ibn Hajar mentioned it in al-Isabah, 1/215. The hadith has supporting narrations in Ibn Majah, no. 1996, and elsewhere.