The mind is like a loop, spitting out info and reading it back in. So if your thinking is garbage your going to continue to think garbage. How do you break the cycle?
By repeatedly thinking only positive stuff maybe
I try to break negative thoughts by reading, watching or doing something positive to change my thoughts. If I’m having negative thoughts I try not to dwell on them too long by distracting myself or replacing them by changing my focus to any positive side to a situation.