Bhagavad Gita 6.26
यतो यतो निश्चरति मनश्चञ्चलमस्थिरम्। ततस्ततो नियम्यैतदात्मन्येव वशं नयेत्।।6.26।।
yato yato niścarati manaścañcalamasthiram| tatastato niyamyaitadātmanyeva vaśaṃ nayet||6.26||
yato yato nishcarati manashcancalamasthiram tatastato niyamyaitadatmanyeva vasham nayet6.26
Meaning
Whenever and wherever the restless, unsteady mind wanders off, one should bring it back and fix it on the Self. Patient, persistent practice is the way.
यह चंचल और अस्थिर मन जिन कारणों से (विषयों में) विचरण करता है, उनसे संयमित करके उसे आत्मा के ही वश में लावे अर्थात् आत्मा में स्थिर करे।
This is verse 26 of 47 in Chapter 6 (Dhyana Yoga) of the Bhagavad Gita.