Bad thoughts can haunt you through you day, or even your week. Bad thoughts can be harmful, especially if you end up over-analyzing something that might be very simple.
Take a break from whatever you are doing, and don’t let anything distract you. Begin to analyze the unpleasant thought and if you can, break it down. Start from when you first had the thought, and think about what has been bothering you.
Talk to a best friend about it. Chances are, he/she can make it seem a lot better.
Distract yourself from the thought. Get something you enjoy and clear your mind of the subject entirely.
If this is a fear-induced thought, you might want to watch a spoof of whatever you were scared of.
If you are not allergic to dogs, think about visiting a dog run. Watching dogs play can be very peaceful and amusing. Some dogs might walk up to you and lick your hands (if you are squeamish, you might want to skip this step).
If the same thought has been bothering you for an extensive period of time, perhaps you should see a psychiatrist.