What if I told you those thoughts are not held against you? What if I told you that not all thoughts we have, are ours? What if I told you that the guilt, condemnation, and sadness you feel is a lie? God doesn’t hold these thoughts against you and you need not hide from Him because He sees all things.
If you have an invasive thought give it to the Lord, literally say to Him “I give you this thought Lord, I want nothing to do with it.” Jesus bore your sins at the cross, so any condemnation you feel is deception because the Lord wants you to walk in freedom. To walk righteously, and that happens through His grace. It is the Lord that sanctifies.
You don’t want the thoughts, so spend time with the Lord (pray, pray in the Spirit), spend time reading His word (the Bible) renewing your mind, and rest in the truth of the blood of Christ, that has granted you forgiveness.
You are brave to share this, and not so many people would be willing to share their thought life. Ask the Lord to cleanse your mind, and be practical about it as well, by doing the things I mentioned. Even if you have a thought pop up, skip over it. It doesn’t define you, Jesus does. Praise Him for His goodness.