One of the best ways to eliminate negative thoughts is to focus on positive thinking and sing positive songs that can fill our minds with joy and happiness. Instead of saying "I want to get rid of these thoughts," try to replace them with positive thoughts about beautiful scenery like forests, beaches, and sunrises.
For instance, you can think of a beautiful forest or imagine yourself walking on a stunning beach watching the sun rising, all of which can help to dominate your thinking with good thoughts.
It's important to note that our minds tend to focus more on negative thoughts when we try to suppress them. As an example, if I tell you "don't think about a polar bear," you are likely to think about a polar bear immediately. However, if you focus on positive and happy thoughts, you leave no space or time for negative ones.
Always focus on the good things and fill your mind with positive energy to eliminate negative thoughts. We don't want to be slaves to our minds or our egos.
I hope this helps you and may you always find happiness, joy, and peace today.