This verse is from the Bhagavad Gita, Chapter 6, Verse 6, where Lord Krishna imparts wisdom to Arjuna regarding self-control and self-realization. Here is the verse in Devanagari script:
bandhur ātmātmanas tasya yenātmaivātmanā jitaḥ
anātmanas tu śhatrutve vartetātmaiva śhatru-vat
One must deliver oneself with the help of one's mind, and not degrade oneself. The mind is the friend of the conditioned soul, and his enemy as well.
बन्धुः (bandhuḥ) - friend
आत्मा (ātmā) - the self
अत्मनः (atmanaḥ) - of the self
तस्य (tasya) - of him
येन (yena) - by whom
आत्मा (ātmā) - the self
एव (eva) - certainly
आत्मना (ātmanā) - by the self
जितः (jitaḥ) - conquered
अनात्मनः (anātmanaḥ) - of one who has failed to control the mind
तु (tu) - but
शत्रुत्वे (śatrutve) - in enmity
वर्तते (vartate) - remains
ता (tā) - they
आत्मा (ātmā) - the self
एव (eva) - certainly
शत्रुवत् (śatruvat) - like an enemy