The Messenger of Allah ﷺ said, "There is a kind of jealousy that Allah loves and a kind that Allah despises, and there is a kind of pride that Allah loves and a kind that Allah despises. As for the jealousy that Allah loves, it is jealousy when there is genuine cause for suspicion. As for the jealousy that Allah despises, it is jealousy without any cause for suspicion. As for the pride that Allah loves, it is when a servant carries himself with pride for Allah's sake on the battlefield, and when he carries himself with pride while giving charity."
حدثنا إسماعيل عن الحجاج يعني الصواف عن يحيى بن أبي كثير عن محمد بن إبراهيم
قال رسول الله ﷺ إن من الغيرة ما يحب الله ومنها ما يبغض الله ومن الخيلاء ما يحب الله ومنها ما يبغض الله فأما الغيرة التي يحب الله فالغيرة في ريبة وأما التي يبغض الله فالغيرة في غير الريبة وأما الخيلاء التي يحب الله أن يتخيل العبد بنفسه لله عند القتال وأن يتخيل بالصدقة