Bhagavad Gita · 6.5
उद्धरेदात्मनात्मानं नात्मानमवसादयेत्।आत्मैव ह्यात्मनो बन्धुरात्मैव रिपुरात्मनः॥
uddhared ātmanātmānaṁ nātmānam avasādayet ātmaiva hy ātmano bandhur ātmaiva ripur ātmanaḥ
One must elevate oneself by one's own self; one should never degrade oneself. The self alone is the friend of the self, and the self alone is the enemy of the self.
— Bhagavad Gita 6.5
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)