The Gemara (Kiddushin 49:) says that if a total rasha (גמור רשע) betroths a woman and says על גמור צדיק שאני מנת, that it is only a marriage if he is a perfect tzaddik, we consider them married (מספק), because he may have had a thought of teshuvah while giving her the ring. This is another source that teshuvah can be done in a moment. This source is often brought to show the power of teshuvah. A thought of teshuvah turns the person around from being a total rasha (rasha gamur) to a perfect tzaddik (tzaddik gamur).
The Gemara (Kiddushin 40:) states, "If one was a rasha his entire life and did teshuvah at the end of his life, his past bad deeds won't be mentioned anymore."
The Gemara (Avodah Zarah 17.) tells the story of a grave sinner, Elazar ben Durdiya, who one day finally did teshuvah and died the very same day. The Gemara says that on the day he was inspired to do teshuvah, he sat between mountains and asked the mountains to daven for him. The mountains replied, "Before we daven for you, we must daven for ourselves, as it states (Yeshayah 54:10) ההרים כי תמוטינה והגבעות ימושו, 'For the mountains shall tilt and the hills totter.'"
Elazar said, "Sun and moon, daven for me." The sun and moon also declined, saying, "Before we daven for you, we have to daven for ourselves, as it states (Yeshayah 24:23) וחפרה החמה ובושה הלבנה, 'The moon shall be ashamed, and the sun shall be abashed.'"
Elazar said, "Stars daven for me. Ask Hashem to have compassion on me!" The stars replied, "Before we daven for you, we need to daven for ourselves, as it states (Yeshayah 34:4) השמים צבא כל ונמקו, 'All the host of heaven shall melt.'"
Realizing he had no one to turn to, Elazar ben Durdiya said, בי אלא תלוי הדבר אין, "The matter is left for me alone." He placed his head between his knees and cried until his soul departed. A bas kol emerged and proclaimed, "Reb Elazar ben Durdiya has now been readied for the life of Olam HaBa."
Rebbe said, "It is not enough that baalei teshuvah are accepted, but they are even called by the title 'Rebbe.'" (The bas kol called him Reb Elazar ben Durdiya. He acquired the title Rebbe because he did teshuvah.)
Reb Elazar ben Durdiya sought assistance from the mountains, the sun, the moon, and the stars in his quest for teshuvah. Alas, he discovered that when it comes to teshuvah and tefillah, בי אלא תלוי הדבר אין, it is all up to me. I can daven for myself and do teshuvah by myself. I don't have to have a support group or a mentor. Of course, these elements help, but even in their absence, one can do teshuvah alone.
We also learn from this story that one can do teshuvah in one moment. It takes just a second, and everything can be turned around. Elazar ben Durdiya was a grave sinner, but at a moment of inspiration, he did teshuvah, acquired Olam HaBa, and was even called Rebbe.
The Rambam (Hilchos Teshuvah 2:2) states, "What is teshuvah? It is (1) to leave the sin, (2) to remove it from his thoughts, and (3) to be determined never to commit this sin again." Teshuvah is a decision never to sin again. This is the essence of teshuvah, and such a decision can be made in a moment.