Don't engage with your negative thoughts; instead, redirect your mind to other thoughts, preferably Torah thoughts. This is much more successful. Check your Tefillin and be careful with Chitas.
https://www.torahrecordings.com/rebbe/igroskodesh/012/005/4103