I'm so sorry that you're going through this. I have experienced something similar to what you're describing regarding the gross thoughts. You may have it worse than I did, but I'll tell you that I had gross thoughts when I looked at normal women and even did have thoughts about my mother, but now, though I must manage my mind still, they don't rule my mind as they did back then. I used to heavily use pornography, but God helped me overcome it back then. It wasn't overnight, I still slipped and messed up, but eventually after seeking Him with all my heart, He gave me victory. And as I drew closer to Him more in the Bible and prayer, my thoughts were less consumed with lust and more dwelling on the truth of God's Word, what He was teaching me, and Who He is.
(Also, I'm not saying you do or don't look at pornography, but in my case that was the reason I had those thoughts. Because that was what I allowed into my mind, then that's what I thought about.)
I'll try to briefly tell you how God says we can have victory over these thoughts.
As natural humans, we are sinners by birth. And as sinners, well, we sin. Sin is any act that is against God's Law. God says that we are in bondage to our sin and are helpless to resist our sin. Sure, you might break a sinful habit in one area, but we are bound to replace it with another sin which will then have its harmful affects on us as well (Romans 6:23). As sinners also, we are found guilty before God based on His Law because we have broken it. His Law was never intended for us to keep, but to show us that we fall short of God's standard of perfection and that we need His forgiveness and grace, otherwise we would perish in our own self-righteousness. So we are sinners in bondage to sin guilty before God. And God warns that the penalty for our sin is eternal death and separation from God in hell forever.
But there is hope!!! Because He loves us so so much even though we are sinners God sent Jesus, His own Son, to make the way for us to be forgiven and reconciled to Himself. And Jesus, because He is God, kept all the Law of God and was completely righteous and innocent. But the Plan was that, though He is righteous, He would take ALL of our sins on Himself and die in our place. He did die in our place, but after three days rose from the grave and overcame our sin and death. Now, no matter who you are and what you've done, if you believe on Jesus Christ to forgive all of your sins and make you righteous before God, you will be saved. And what comes with that is that God recreates us inside. 2 Corinthians 5:17 says that if anyone is in Christ, he is a new creature. The Bible says that from that point on, we have the mind of Christ Jesus in us, so He then enables us to be renewed in our minds by putting off the gross thoughts and filling our minds with God's truth and love. You can have peace in knowing God. That's the only way I found victory over it. Of course, you'll have to manage your thoughts, but God gives power to do that and it gets easier.
I hope that helps a little.