Q. How does one know that Hashem has accepted his Teshuva, especially for sexual sins?
A. Teshuvah can be a lifelong job, but the doors of Teshuvah are never closed. The first prerequisite to doing Teshuvah is obviously to stop doing the sins. But after one has stopped, how can he know if his Teshuvah is on the proper path, and when can he know that it was accepted in heaven? I have found meanwhile five different approaches to this, and all of them are true!
1) The Chofetz Chaim says that the essence of doing Teshuvah is to make a careful reckoning of what things brought you to sin, or made it possible for you to sin, and from now on to avoid those things like fire. One who does this is fulfilling the Mitzvah of "doing Teshuvah" properly.
2) The Ramba"m writes that true Teshuvah is achieved when one has the same opportunity to sin as before - and the same desire, and yet he doesn't. When that happens and you keep passing these tests, you will know that you have done true Teshuvah.
3) Chaza"l say that true Teshuvah is acheived "Ki'sheme'id alav yode'ah talumos shelo yashuv lekislo od" - Translation: "When G-d, who knows all hidden things, bears witness on him that he will not go back to his bad ways again". But how can a person know when G-d bears witness on him? The Ba'al Hasulam explains that when a person is given a gift by G-d to truly feel that it would be as bad for him to go back to his old ways as sticking his hand into fire, that is a sure sign that Hashem has testified on him that he will never go back to his old ways!
4) The holy Chassidic master, Rabbi Mendel of Vitebsk writes (in his sefer Pri Ha'aretz) that true Teshuvah is through Messiras Nefesh (to be ready to die for it), and he explains that a person can reach this level if they feel so bad about their sins that they would rather to be dead than to do these sins again. If a person feels this way, then they know they have done a true and exalted Teshuvah.
5) The Sefer Taharas Hakodesh, written by the first Shomer Emunim Rebbi Zatza"l mentions, that the biggest tikkun (rectification) of Teshuvah is the the suffering that one feels when the Yetzer Harah comes to him again and this time he doesn't listen to him!
6) The best type of Teshuvah is accepting personal shame and abuse and not responding. See this amazing piece from Rav Avraham galanti, brought down in the Beis Ahron from Karlin.
7) Someone posted on the forum:
A Rebbe of mine once gave the following analogy: Someone who refuses to marry a Gerusha because he does not believe that she is permissible to him (i.e. since he reasons that she was once a married woman, so how could the fact that she received a Get, which is merely a piece of paper, change that fact?) - is an Apikorus. After all, the Torah says explicitly that, once she is given a Get, a woman is permitted to other men.
The same is true with Teshuva. If someone does sincere Teshuva, but is not sure that it really works, he's the same Apikorus, because the same Torah that tells us that a Get works tells us that Teshuva works. But what about Yisurim? Rav Moshe writes clearly (Igros Moshe Orach Chaim 4:116) that Teshuva and Yom Kippur atone for Zera Levatala, and that Yisurim are not necessary.
More on Teshuvah....
Chaza"l say that when one repents through the fear of G-d, his past sins become forgiven and become considered as "mistakes". However, when one repents through the love of G-d, his past sins become changed into actual merits.
Chaza"l also say that Teshuvah was created even before the world was created, to show us how important it is, and that without it, the world would have no chance to exist. Indeed, Adam, the first man, was shown the power of Teshuvah after he ate from the tree of knowledge, in that he was spared to live for another 970 years. G-d also brought the greatest Tzaddik of all men, David Hamelech, to sin with Bat-Sheva to demonstrate the great power of Teshuvah (See Psalm 52 where Dovid pleads to Hashem to forgive him for this sin), and also to show us that even great men can sin and do Teshuvah.
See here for more on Teshuvah.
See here for some great links to help you on your path to true Teshuvah.