Here's some chizuk from The Battle of the Generation (
https://guardyoureyes.com/ebooks/item/the-battle-of-the-generation ), Chapter 11:
The incredible story of the teshuva of Rabbi Elazar ben Durdia is related by the Gemara (Avodah Zara 17a). Elazar ben Durdia was known to have visited every woman of ill repute in the world. Once, he heard of such a woman who lived far away. He amassed a bag of gold coins and traveled across seven rivers to reach her. When she met him, this woman recognized his depravity and told him that he would never be accepted back in teshuva. Struck by her statement, he ran out of the house.
Elazar sat between two mountains and valleys. He cried out, “Mountains and valleys, beg for mercy on my behalf!” The mountains and valleys declined his request. He then asked the heavens and earth to beg mercy for him, but he was turned down again. He called out for the sun and moon to plead on his behalf, and they too refused. He begged the stars and constellations for help, and he was rebuffed once again.
Finally, Elazar said to himself, “It all depends on me!” He sobbed bitterly over his sins until he died. At that moment, a heavenly voice proclaimed, “Rabbi Elazar ben Durdia is ready to enter Olam Habba.”
When Rebbe (Rabbi Yehuda HaNasi) heard this, he cried and said, “Some people acquire their portion in the World to Come over many years, while others acquire their portion in one minute!” Rebbe continued, “Not only do they accept those who repent [in Heaven], they even call them ʻRabbi!’”
There is a lot to learn from this story. Let’s start by examining what caused Elazar ben Durdia to do teshuva. What changed? Before this woman told him that he wouldn’t be accepted back in teshuva, didn’t he know that what he had been doing his whole life was wrong? Of course he knew Hashem didn’t like promiscuity, but that did not stop him from acting as he pleased. What changed now? What woke him up and caused him to change his life?
Rabbi Shafier (Shmuz 3: “Yom Kippur: The Power of Teshuva,”
www.TheShmuz.com) answers that Elazar realized he had hit rock bottom. When that sinful woman made her remark, he understood that he had fallen lower than he’d ever thought possible, certainly lower than where he was comfortable viewing himself. That shocking realization broke through all his rationalizations, waking him up and enabling him to see clearly. Not liking where he saw himself brought him to tears, and he turned around immediately. Of course, Hashem accepted his teshuva; Hashem eagerly awaits the repentance of even the most sinful people because of His tremendous love for all His children.
For many people, there comes a point in their lives when they overstep their bounds and do what they never thought they would stoop to do. The shock and regret they feel afterward is searing. It is vital that they respond properly to this pain because this moment is the most critical moment of their lives. In that instant, they can decide to see past their rationalizations and change, or they can defend their decisions instead.
Unfortunately, no matter how they respond, it will be painful. Whether they commit to act differently or try to deny their mistakes, they cannot completely quell the agonizing realization that they have done something wrong. Deep down, they know they failed, and that feeling is excruciating.
But there is a way for a person to mitigate much of this pain, and that is by saying to himself, “I will make this the most productive thing that ever happened to me because I am going to use it to change my whole life! Years from now, I am going to look back and realize that all I have become is because of what happened today, and that had it not happened, I probably would have continued to plummet further instead. I am going to become a different person and reach greatness because of what happened!” Making what happened productive by deciding to turn around because of it eases the sting of regret like nothing else can. Best of all, it is a huge shortcut on the road to self-control. It enables us to attain lasting change much faster than usual.
Of course, we must also remember that teshuva completely wipes away our sins as if we never did them. Once we repent, we no longer have to feel down about what we did. We can take comfort in the knowledge that our error has been erased and move on.