Avoid everything that can affect you badly. Your environment is one of biggest factors that influence your thought. If the environment is negative, you will be surrounded by it and then your thought will be affected too. If it is positive, you will be surrounded by positive things that can support you for having positive thinking.