how to prevent negative thinking