Negative thinking is often a way of talking to yourself learned early in life.
Realize we all write a partly fictional story of ourselves early in life. You need to re-write the story with the h help of caring, rational people in your life. Negativity is learned behavior, anything that is learned can be unlearned. Best wishes.