Chapter 6 · The Yoga of Meditation · Krishna said
Bhagavad Gita 6.6 — Mind as friend or foe
बन्धुरात्मात्मनस्तस्य येनात्मैवात्मना जितः। अनात्मनस्तु शत्रुत्वे वर्तेतात्मैव शत्रुवत् ॥
bandhurātmātmanastasya yenātmaivātmanā jitaḥ | anātmanastu śatrutve vartetātmaiva śatruvat ||
Meaning
For one who has conquered the mind, the mind is the best friend. For one who has not, that same mind behaves like an enemy.