The Messenger of Allah ﷺ said, "Some forms of jealousy Allah loves and others He hates. As for what He loves, it is jealousy when there is genuine cause for suspicion. As for what He hates, it is jealousy without any cause for suspicion."
حدثنا محمد بن إسمعيل حدثنا وكيع عن شيبان أبي معاوية عن يحيى بن أبي كثير عن أبي سهم
قال رسول الله ﷺ من الغيرة ما يحب الله ومنها ما يكره الله فأما ما يحب فالغيرة في الريبة وأما ما يكره فالغيرة في غير ريبة
[Sahih] Abu Shahm, Hafiz said in Taqrib that this is how it appears in his source, meaning in Ibn Majah, but the correct name is Abu Salama, who is Ibn Abdul-Rahman, and Abu Salama is a well-known thiqa. His hadith has a corroborating narration in Dawud, no. 2659, and elsewhere, and Ibn Hibban graded it sahih (Mawarid), no. 1313, as did Hafiz in Isabah*.