There is nothing that doubts and doesn’t calm the soul except the act of sin. Indeed, the person who is righteous in his heart, if he wants to do evil, his soul will doubt and he hates his actions known to others.
Basically, humans will feel uneasy, depressed, and anxious when committing sins, even though they justify their actions but finally they will anchor in their hearts. Whereas the heart is central to the good and bad of a human being. And the righteous heart will be guided by righteous religion and knowledge.
The Prophet said ”
دَعْ مَا يَرِيبُكَ إِلَى مَا لَا يَرِيبُكَ فَإِنَّ الصِّدْقَ طُمَأْنِينَةٌ وَإِنَّ الْكَذِبَ رِيبَةٌ
Leave what makes you doubt for what does not make you doubt. Verily, truth brings peace of mind and falsehood sows doubt. (Sunan al-Tirmidhī 2518)