Bhagavad Gita 6.26
यतो यतो निश्चरति मनश्चञ्चलमस्थिरम् ।
ततस्ततो नियम्यैतदात्मन्येव वशं नयेत् ॥ २६ ॥
As often as the wavering and unsteady mind goeth forth, so often reining it in, let him bring it under the control of the Self.
Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.