Bhagavad Gita : Chapter 6, dhyana yoga or the yoga of meditation
especially, verse 6. For him who has conquered the mind, the mind is the best of friends; but for one who has failed to do so, his mind will remain the greatest enemy. (http://vedabase.net/bg/6/en.php)

Lao Tzo’s Tao Te Ching, chapter 33
Knowing others is intelligence;
knowing yourself is true wisdom.
Mastering others is strength;
mastering yourself is true power.
(Stephen Mitchell trans. – there are dozens of translations)

commonly quoted as:
He who controls others may be powerful, but he who has mastered himself is mightier still. OR
He who conquers others is strong; he who conquers himself is mighty.

See also:
It is better to conquer yourself than to win a thousand battles. OR
A man who conquers himself is greater than one who conquers a thousand men in battle. – buddha

For a man to conquer himself is the first and noblest of all victories. – Plato

Man conquers the world by conquering himself. -Zeno of Citium, Greek philosopher and the founder of the Stoic School of philosophy

You have control over your mind – not outside events. Realize this, and you will find strength. – Marcus Aurelius

The Bible: Proverbs 16:32
(ESV)Whoever is slow to anger is better than the mighty, and he who rules his spirit than he who takes a city.

(new living translation) Better to be patient than powerful; better to have self-control than to conquer a city.

(king james) He that is slow to anger is better than the mighty; and he that ruleth his spirit than he that taketh a city.

There is little that can withstand a man who can conquer himself. – Louis XIV

It is not the mountain we conquer but ourselves. – Edmund Hillary

The true hero is one who conquers his own anger and hatred. -Dalai Lama

If you do not conquer self, you will be conquered by self. – Napoleon Hill