If one knows that the thought is wrong, then one should not agree with it and say it to himself. This leads to negative consequences even if it may have some therapeutic effect to treat CBT. For these cases, I recommend the Hadiths/Du’as that we have from the Ahlulbayt (a). They help address negative thoughts and OCD.