एतैर्विमुक्तः कौन्तेय तमोद्वारैस्त्रिभिर्नरः।आचरत्यात्मनः श्रेयस्ततो याति परां गतिम्॥
etair vimuktaḥ kaunteya tamo-dvārais tribhir naraḥācaraty ātmanaḥ śreyas tato yāti parāṃ gatim
Word by word
The verse says
Freed from those three gates of darkness, a person does what is actually good for himself, and so goes to the highest place.
In plain words
Look at what the freed person is said to do. Not: becomes holy. Not: gives everything up.
Ātmanaḥ śreyaḥ - what is good for himself.
That is a surprising thing to find at this point. The opposite of the state just described is not self-denial. It is finally being able to act in your own real interest.
Where you've felt this · in health
You have known for two years that you sleep badly because of what you do in the two hours before bed. You knew it the whole time. Then one week, for no reason you can identify, you simply stop doing it. Nothing was overcome. You just stopped being interested in the thing, and the evenings became your own again.
Going deeper
Doing what is good for yourself is named as the mark of freedom here, and after fifteen verses about appetite that deserves a second look.
The phrase means one's own benefit. Real benefit, not what you fancy. This chapter has spent its whole length describing people doing exactly what they wanted and being ruined by it. So wanting and benefit have come apart, and the verse is pointing straight at the gap.
This is the Gita's actual position on selfishness, and it is not the obvious one. The trouble with the person described here was never that they looked after themselves. It is that they were in no condition to know what that would involve. Appetite was answering a question that belonged to judgement.
Which means the three doors are not closed in order to make you suffer. They are closed so that the question of what is good for you can finally be heard, without three loud voices answering it first.