"Thought is a garment and a servant for the mind and the emotions. When it is not assigned a task by the mind or the emotions, it still remains active, thinking and imagining however not only does this activity lack substance, it is uncontrolled and decadent...

As is explained elsewhere, the cause of alien thought and evil thoughts is an EMPTY mind. When one's mind is busy, thought has a purpose to serve, and there is no place for foolish an worthless thought that lack substance."
(Hayom yom tes zayin cheshvon.)

In other words:
Our minds, as we know, are constantly in action. This means that when our mind is not focused, our thoughts begin to wonder... And we all know where that leads! So the trick is not to cast away those evil thoughts and try and fight them off, but to simply preoccupy our mind with something totally not related.

One way to occupy the mind is actually by doing something. You end up keep your mind focused on that which you are busy doing at hand.
I personally tend to find myself deep in anxious thoughts, when I'm at home sitting on the couch doing absolutely nothing!

To sum up:
Our minds are always working. It is out task to show them what to work on. Instead of spending a lifetime trying to fight off negative thoughts, we should occupy our mind with positive thoughts. R"R: "darkness you don't drive away with a stick."

Best wishes!