In plain words
For one who has conquered oneself through oneself, the self is a friend; but for one who has not mastered oneself, that very self behaves like an enemy.
Word for word
The self [is] friend to the self of him by whom the self itself has been conquered by the self; but for one not self-controlled, the self itself would remain in enmity, like an enemy.
बन्धुरात्माऽऽत्मनस्तस्य येनाऽऽत्मैवाऽऽत्मना जितःअनात्मनस्तु शत्रुत्वे वर्तेताऽऽत्मैव शत्रुवत्
Other commentaries
The commentators
▸Bhagavadgītābhāṣyam
आत्मैव बन्धुः आत्मैव रिपुः आत्मनः इत्युक्तम् । तत्र किंलक्षण आत्मा आत्मनो बन्धुः, किंलक्षणो वा आत्मा आत्मनो रिपुः इत्युच्यते —
बन्धुः आत्मा आत्मनः तस्य, तस्य आत्मनः स आत्मा बन्धुः येन आत्मना आत्मैव जितः, आत्मा कार्यकरणसङ्घातो येन वशीकृतः, जितेन्द्रिय इत्यर्थः । अनात्मनस्तु अजितात्मनस्तु शत्रुत्वे शत्रुभावे वर्तेत आत्मैव शत्रुवत् , यथा अनात्मा शत्रुः आत्मनः अपकारी, तथा आत्मा आत्मन अपकारे वर्तेत इत्यर्थः ॥ ६ ॥
In plain words
It was just said: the self alone is your friend, the self alone is your enemy. So — which self is a friend to itself, and which self is an enemy to itself? That is what is said now:
'The self is the friend of the self' means: for that self by whom the self itself has been conquered — where 'self' here means the whole aggregate of body and organs — for whoever has brought that under control, meaning someone whose senses are mastered, the self is a friend. But for someone lacking that self-mastery, whose self remains unconquered, the self stays in a state of enmity — becomes its own enemy. Just as an outside enemy does harm to a person, so, in this case, the self ends up harming the self. That's the meaning.
Close to the Sanskrit
"The self alone is the friend, the self alone is the enemy of the self" — thus it has been said. There, of what characteristic is the self a friend to the self, or of what characteristic is the self an enemy to the self — this is said:
'The self is the friend of the self' — of that self, of that self, he, the self, is friend — by whom, by the self, the self itself has been conquered; 'self' [here meaning] the aggregate of body and organs, by whom it has been brought under control — [i.e.] one whose senses are conquered. That is the meaning. But for one without self-mastery, [i.e.] whose self is unconquered, does the self remain 'in the state of enmity,' [i.e.] in the condition of being an enemy — the self itself, like an enemy — just as an external, non-self enemy is harmful to the self, so too the self would engage in harming the self. That is the meaning.