If you can’t keep your thoughts positive then find things to keep your thoughts occupied with learning and excitement. At least occupied thoughts will limit the space that negative thoughts would try to fill.
I once let negative thoughts get the better of me, that led to a downward spiral of cynicism, mistrust and selfishness which destroyed my life. Never going to let that happen again. ~ Pete Bell