[י"ג אדר ה'תשי"ב]
... לענין מחשבות זרות, צריך להרבות באותיות התורה ואותיות התפלה. ושיהי' גם כן חקוק במוח זכרונו איזה פרקים תניא ואיזה פרקים משניות, שזה מגין אפי' בשעה שאין חוזרים אותם ואפילו במחשבה. וכמובן בלקוטי תורה סוף פ' קדושים, ובמילא מהנכון שילמוד בע"פ גם את דרוש הנ"ל והדרת פני זקן.
כיון שלעתים תכופות מחשבות הנ"ל מבלבלות דוקא בעת התפלה ובעת הלמוד, לכן טוב שבעת התפלה ובעת הלימוד יהי' הסידור או הספר שלומד - [פתוח] לפניו באותו מקום שעומד. וכשירגיש שמחשבותיו מתפזרות הרי יעיין תיכף בהסידור והספר - שאותיות הכתב, האלטען איין...
Regarding distracting thoughts, one must increase engagement with the letters of Torah and the letters of prayer. It is also important to have memorized some chapters of Tanya and some chapters of Mishnayos, as this protects even at times when they are not being reviewed—even in thought. As is evident in Likkutei Torah at the end of Parshas Kedoshim, it is therefore appropriate to also learn by heart the aforementioned discourse and 'Hadaras Pnei Zaken.'
Since these distracting thoughts often disturb specifically during prayer and study, it is good that during prayer and learning, the siddur or sefer being used should be open before him at the place he is up to. When he feels his thoughts are scattering, he should immediately look into the siddur or sefer—the written letters hold him in place…
Summary
The Rebbe teaches that immersing oneself in Torah study, memorizing sacred texts like Tanya and Mishnayos, and keeping one's focus on the written words during prayer or learning are powerful tools to overcome distracting thoughts.