All you need to do to get rid of obsessive thoughts is to watch the mind without getting involved. You will get really good at this with just a little practice. This practice, or “sadhana” as called in Hindu scriptures, is the root of awakening from the illusion of mind.
Without trying to understand this practice just implement it. The more you try to understand the more mind gets involved. Just watch the mind and you will soon see that you are not the mind at all. That the mind is like a machine in your head that generates thoughts based on your attention/interest. Be free of your mind by depriving it of your interest. This is the only direct path of becoming free of the mind.
It seems to work.