how do you deal with bad thoughts?

Cut them off as soon as you notice them and tell yourself the opposite. The brain is lying to you with automatic negative thoughts so if you ignore it for long enough it just kinda stops, lol. Takes a while tho