“Ātman is a friend to the ātman of one by whom ātman itself has been mastered through ātman. But for one who has not mastered ātman, ātman itself would behave with hostility, like an enemy.”
Going deeper
The answers are spread across chapters. 5.29, at the close of chapter 5, says that one who knows Kṛṣṇa as the Friend of every being, along with the enjoyer of sacrifices and the Lord of all worlds, attains peace. Soon after, in chapter 6, the friend moves inside. 6.5 says one should raise oneself by one's own mind and not sink, for the mind alone is the friend of the self and the mind alone its foe. 6.6 draws the line: the mind is the friend of one who has conquered it, and for one who has not, it stays hostile like an enemy. 6.9 turns to other people. The one who regards well-wishers, friends, foes, neutrals and relations with an equal eye, and even the good and the sinful, excels. 12.13 describes someone who hates no being and is friendly and compassionate. The Sanskrit changes with each turn: suhṛd at 5.29, bandhu at 6.5, maitra at 12.13. See what the Gītā says about love.