We all have negative thoughts and emotions. It’s just a part of life. But, God gave us ways to deal with them. I remember the quote that says “For as we think in our heart, so we are.”
The way I deal with negative thoughts is replace it with a promise of God. For example if our thought is “I can’t do this” replace the thought with “You can do all things through Christ, which strengthens me.” found in Philippians 4:13.
I believe we can never end anything negative without replacing it with something positive.
Here are a few common negative thoughts and a promise God gave to counteract them:

