Hello Friend, Good that you are seeking a help here. Appreciate you for ackowledging the problem and willingness to change.
Yes, there are various techniques and therapies to induce positive thoughts in your mind. You can watch and practice the "Louise hay" position affirmation video in YouTube.
However it better to take a professional counselling support to assess yourself first on the holistic state of your mind. This will helps to identify and unearth any emotion or distraction that's causing negative thoughts.
Next Steps
Consult a psychologists directly or online. Feel free to reach out to me online through Practo for further detailed evaluation and suitable solutions that you can follow practically to overcome this negativity. You will be alright soon.