I don't think there is any way we can completely and permanently get rid of the negativity in our lives and around us.
But we can control if, and how, it affects us. We have to remember that WE are in control of what we put into our minds. Therefore, we can control how it affects us.
However, it is not always easy. I was a life-long negative thinker and I still struggle with negative thoughts and dealing with negative people.
Start by making small, short-term goals to improve your negative thinking. Don't jump in and make it a goal to wipe it all out in one fell swoop. You will surely fall short of your goal and that will only reinforce negative thinking.
Take it a day at a time. For some, it will have to be an hour at a time. And, by all means, don't put yourself down if you regress. Remember, that it will take time. It helps to surround yourself with positive friends. Music, is one way I keep negative thoughts away. Music keeps me focused on the pleasantness of the melody.
Try this: look for the good in others, and compliment them. This takes the focus off of yourself and your negative thinking and looks for the positive in others.
Also, constantly remind yourself of the good qualities you possess and concentrate on those.
Another thing that always helps me keep negative thinking at bay, is reading the Bible and focusing on God's love and how he made us in his image.