Let’s just say I can relate to your struggles. For me, after I finally went to Confession after a long absence, I got a spiritual strength I hadn’t before. Although the priest didn’t even mention this, God showed me that it’s mostly a matter of the thoughts we pay attention to in our minds. While we can’t help the thoughts going through, if we pay attention to them, and entertain them, that’s what really ignites the flame that leads us into trouble.
I usually hold a rosary in the night when I sleep which also helps to keep my thoughts directed purely.
This is what has helped me, hopefully this will help you too!
God bless