Well it sounds like the negative thoughts are more a result from depression and/or low self-esteem, and that can be corrected with Cognitive Behavioral Therapy (CBT). CBT has a premise that your symptoms are caused by negative thoughts, so if we change your thought process to be more positive and objective, then your symptoms will lessen as well. Here are a few good examples of CBT techniques that you can use:
So this link may help you, it contains a technique I use with patients called a thought record. It will help you keep track of any negative thoughts you have. You put the negative thought on paper, the emotion accompanying, the evidence to support it, and the evidence against it. Then I want you to come up with an alternative thought for the situation (more objective and plausible). This will help you change your way of thinking to be able to think more positive and not automatically go to a negative type of thinking.
In addition, these two worksheets are very good at helping to lessen negative type thinking. It can help you focus on the big picture and the objective/positive thoughts and outcomes.
Ultimately though it would be wise to enter into CBT therapy with a psychologist since it takes months for any type of therapy to be effective, as therapy is very gradual. Also one on one therapy can be individualized to your particular issue and your specific negative thoughts. Overall CBT therapy is what you want to help stop these automatic negative thoughts.