Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:4:110

And whoever does a wrong or wrongs himself but then seeks forgiveness of Allah will find Allah Forgiving and Merciful.  

Whoever does evil, ˹commits˺ a sin by which another is harmed, as when Tu‘ma falsely accused the Jew, or wrongs himself, committing a sin ˹the consequences of which are˺ limited to him, and then prays for God’s forgiveness, for it, that is to say, ˹and then˺ he repents, he shall find God is Forgiving, Merciful, to him.
القرآن:٤:١١٠

وَمَنْ يَعْمَلْ سُوءًا أَوْ يَظْلِمْ نَفْسَهُ ثُمَّ يَسْتَغْفِرِ اللَّهَ يَجِدِ اللَّهَ غَفُورًا رَحِيمًا  

{ومن يعمل سوءا} ذنبا يسوء به غيره كرمي طعمة اليهودي {أو يظلم نفسه} يعمل ذنبا قاصرا عليه {ثم يستغفر الله} منه أي يتب {يجد الله غفورا} له {رحيما} به.