Ibn Jabir bin Atiq said: My father narrated to me a hadith that the Messenger of Allah, peace and blessings be upon him, said: "There is a kind of jealousy that Allah likes and a kind of jealousy that Allah dislikes. The jealousy that Allah likes is when a person is jealous in a situation of doubt (for example, if someone jokes or laughs with his wife in seclusion, he feels jealous), and the jealousy that Allah dislikes is when a person is jealous without any doubt (or evidence), without any reason (for example, if someone leaves his house and he, without investigation, kills him out of jealousy)."
Hadith Referenceسنن دارمي / من كتاب النكاح / 2263
Hadith Gradingتحقیق (حسین سلیم أسد الدارانی):إسناده صحيح والحديث متفق عليه، [مكتبه الشامله نمبر: 2272]
To be protective (showing ghayrah) in situations where there is a possibility of accusation, that is, where there is a fear of disgrace—such as sitting in a tavern, or being alone with a non-mahram woman—when a person exercises protective jealousy (ghayrah), he will avoid sins. If he abandons this sense of honor (ghayrah), then whatever he does or whatever happens, he will not care.