The Messenger of Allah (ﷺ) said: “Whoever sits in a sitting and engages in much empty, meaningless speech and then says before getting from that sitting of his: ‘Glory is to You, O Allah, and praise, I bear witness that there is none worthy of worship except You, I seek You forgiveness, and I repent to You, (Subḥānaka Allāhumma wa biḥamdika, ashhadu an lā ilāha illā anta, astaghfiruka wa atūbu ilaik)’ whatever occurred in that sitting would be forgiven to him.”
Jami` at-Tirmidhi Book 48, Hadith 64
"I was a man who had a lot of desire for women, and I do not think there was any man who had as great a share of that as me. When Ramadan began, I declared Zihar upon my wife (to last) until Ramadan ended. While she was talking to me one night, part of her body became uncovered. I jumped on her and had intercourse with her. The next morning I went to my people and told them, and said to them: 'Ask the Messenger of Allah (ﷺ) for me.' They said: 'We will not do that, lest Allah reveal Quran concerning us or the Messenger of Allah (ﷺ) says, something about us, and it will be a lasting source of disgrace for us. Rather we will leave you to deal with it yourself. Go yourself and tell the Messenger of Allah (ﷺ) about your problem.' So I went out and when I came to him, I told him what happened. The Messenger of Allah (ﷺ) said: 'Did you really do that?' I said: 'I really did that, and here I am, O Messenger of Allah. (ﷺ) I will bear Allah’s ruling on me with patience.' He said: 'Free a slave.' I said: 'By the One Who sent you with the truth, I do not own anything but myself.' He said: 'Fast for two consecutive months.' I said: 'O Messenger of Allah, the thing that happened to me was only because of fasting.' He said: 'Then give charity, or feed sixty poor persons.' I said: 'By the One Who sent you with the truttu we spent last night with no dinner.' He said: 'Then go to the collector of charity of Banu Zuraiq, and tell him to give you something, then feed sixty poor persons, and benefit from the rest.'"
Sunan Ibn Majah Book 10, Hadith 47
“I came to Safwan bin `Assal Al-Muradi so he said to me: ‘What has brought you, O Zirr?’ So I said: ‘The desire for knowledge.’ So he said: ‘It has been conveyed to me that the angels lower their wings for the seeker of knowledge, out of pleasure with what he is doing.’” He said: “So I said to him: ‘Indeed there is something wavering’ - or - ‘some doubt in my chest concerning wiping over the Khuff after defecation. So have you retained anything from the Messenger of Allah (ﷺ) concerning that?’ He said: ‘Yes, when we were travelers, he (ﷺ) used to order us not to remove our Khuff for three days and nights, except from sexual impurity, but not from defecation, urination, and sleep.’” He said: “So I said: ‘So have you memorized anything from the Messenger of Allah (ﷺ) concerning love?’ He said: ‘Yes, we were in one of our journeys with the Messenger of Allah (ﷺ) when a man, a harsh, foolish Bedouin, who had been at the end of the group, called him with a loud voice, saying: “O Muhammad! O Muhammad!” So the people said to him “Mah! Indeed, you have been prohibited from this.” So the Messenger of Allah (ﷺ) responded to him with similar to his voice: “Come.” So he said: “A man loves a people but he has not reached them?” He said: ‘So the Messenger of Allah (ﷺ) said: “A man is with whomever he loves.”’
Zirr said: “He did not cease reporting to me until he had reported that Allah, the Mighty and Sublime, has appointed a gate in the west - its width is the distance of a seventy-year journey - for repentance: it shall not be locked until the sun rises from its direction, and that is the Statement of Allah, Blessed be He and Most High, of the Ayah: The Day some of the signs of your Lord come, no soul shall be benefited by its believing.”
Jami` at-Tirmidhi Book 48, Hadith 167