Letting go of negative thoughts

Hi, simple question for a probably complex answer. I am asking myself why I keep going back to negative thoughts that do not serve me. Like, I could go back in the past to something I said or did, so that holding the thought keeps bringing back the feeling it creates.
Now I understood how the same happens with thoughts that create desire. I keep going back to thinking about food because I have some belief my life is better having more of that, and the more I think those thoughts the more they create desire, the more dopamine I get when the desire is satisfied. And so the approach to lessen desire is to not give the reward to catch these thoughts and start questioning them, and ultimately offering different thoughts that do not create the same desire. What I experience indeed is that over time the thoughts start getting more and more sporadic.
But why do negative thoughts seem to keep coming back in the same way? I am not creating any overdesire or overreward in this case it seems to me. So what could I do to have them come back less and less? Thanks!