The Steipler talks about these nisyonos in Kraina de'igrisa, and he tells us not to think about the past, but only to look forward. Even Teshuvah, the Steipler writes, should be left for once a person is married, lest it bring him to "atzvus".
He also tells people not to think they will be able to change completely right away, but that it will take time and effort... Every time we say "no" eventually comes together, and we will find the strength to be free of these sins altogether.
The Steipler also advises people to keep davening - even 100 times a day, a short teffilah, like: "Hashem, please save me!". We may not see Hashem's answer right away, but no teffilah is lost and it all adds up and comes together in the end.
And, he writes, the best medicine against these nisyonos is to learn Torah with true yegiyah - effort and diligence, and to make sure that we are always in a good environment, surrounded by serious Yidden - ovdei Hashem, especially in times when we feel weak.