I’m going to pull a few excerpts from Patanjali’s Yoga Sutras on overcoming Distractions of the mind:
1.30. Disease, inertia, doubt, lack of enthusiasm, laziness, sensuality, mind-wandering, missing the point, instability- these distractions of the mind are the obstacles.
1.31. Pain, despair, nervousness, and disordered inspiration and expiration are co-existent with these obstacles.
1.32. For the prevention of the obstacles, one truth should be practiced constantly.
1.33. By cultivating friendliness towards happiness and compassion towards misery, gladness towards virtue and indifference towards vice, the mind becomes pure.
1.34. Optionally, mental equanimity may be gained by the even expulsion and retention of energy.
1.35. Or activity of the higher senses causes mental steadiness.
1.36. Or the state of sorrowless Light.
1.37. Or the mind taking as an object of concentration those who are freed of compulsion.