How to banish Machshavos Zaros:
Its possible-When you sleep, you don’t have worries: Just as when one drifts to sleep he has no worries or foreign thoughts troubling him, so too, when one is Davening, it is possible to rid oneself of all foreign thoughts and internal disturbances. [The fact that one can fall asleep sleep without being troubled by foreigne thoughts proves that in truth they are not so important, and it is certainly possible to rid oneself of them throughout his prayer]. If one can get rid of foreign thoughts for a physical matter, then certainly one can do so for prayer which is for the benefit of their soul.]
External disturbance-Contemplate its purpose is to disturb you so you have greater Kavana: In Tanya, the Alter Rebbe explains that at times a disturbance is purposely brought onto a person in order so he strengthen his concentration. He explains as follows: When a gentile is disturbing one’s prayer, it is a spark of the Shechina in exile. The reason why Hashem is permitting and even assisting the gentile to disturb one’s prayer is in order so one strengthen his concentration on his prayer to such intensity that he becomes unaware of the Gentile. Through doing so, not only does one have a greater prayer, but he also redeems the spark of the Shechina found in exile in the gentile. Nonetheless, the Rebbe emphasizes that this only applies to external disturbances caused by a gentile and the like, and not towards one’s personal foreign thoughts.
Midas Hanetzach: In order to overpower one’s foreign thoughts which come like a river one needs to arouse within his soul the Mida of Netzach, stubborn determination, to banish the thoughts. [The Mida of Netzach when aroused allows one to accomplish things that seemed completely out of reach prior. Often, failure of achievement comes from a lack of motivation and push to reach one’s goal. The Mida of Netzach activates an inner soul power of determination to meet one’s goal no matter what.]
 Basi Legani 1970, printed in Melukat Daled p. 149-151
 Kuntrus Havoda11 p. 23, brought in Melukat ibid p. 149
 Tanya Igeres Hakodesh 25
 Basi Legani of Rebbe Rayazt 20; Melukat ibid