What sort of "bad thoughts"? It would be a lot easier to help you out if you explained your problem in detail.
Well I think it depends on what kind of a person you are. I'm very task-oriented, so having something to really focus on always makes me feel better. Find something that interests you, but also gives you a hard challenge to complete. Another possibility is just watch something you think is really funny or really emersive to get away from it. I hope this helps, post any questions.