Mishkat al-Masabih 45
وَعَنْ أَبِي أُمَامَةَ أَنَّ رَجُلًا سَأَلَ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَا الْإِيمَانُ قَالَ إِذَا سَرَّتْكَ حَسَنَتُكَ وَسَاءَتْكَ سَيِّئَتُكَ فَأَنْتَ مُؤْمِنٌ قَالَ يَا رَسُولَ اللَّهِ فَمَا الْإِثْمُ قَالَ إِذَا حَاكَ فِي نَفْسِكَ شَيْءٌ فَدَعْهُ» . رَوَاهُ أَحْمد
From Abu Umamah that a man asked the Messenger of Allah ﷺ: "What is iman?" He said: "When your good deed pleases you and your bad deed grieves you, then you are a believer." He said: "O Messenger of Allah, then what is sin?" He said: "When something unsettles your soul, leave it." Reported by Ahmad.