In plain words
Whatever being one remembers when leaving the body at death, that being one surely attains, son of Kunti, having been formed by constant dwelling upon it.
Word for word
Whatever being, remembering [it], [one] gives up the body at the end, that very [being one] goes to, O son of Kuntī, having always cultivated the thought of it.
यं यं वाऽपि स्मरन् भावं त्यजत्यन्ते कलेवरम्तं तमेवैति कौन्तेय सदा तद्भावभावितः
Other commentaries
The commentators
▸Bhagavadgītābhāṣyam
न मद्विषय एव अयं नियमः । किं तर्हि ? —
यं यं वापि यं यं भावं देवताविशेषं स्मरन् चिन्तयन् त्यजति परित्यजति अन्ते अन्तकाले प्राणवियोगकाले कलेबरं शरीरं तं तमेव स्मृतं भावमेव एति नान्यं कौन्तेय, सदा सर्वदा तद्भावभावितः तस्मिन् भावः तद्भावः स भावितः स्मर्यमाणतया अभ्यस्तः येन सः तद्भावभावितः सन् ॥ ६ ॥
In plain words
This rule does not hold for me alone. What then? —
Whatever state a person is holding in mind — some particular form of the divine — remembering it, dwelling on it, as he lets go of the body at the very end, at the moment the breath departs — that is exactly what he goes to, and nothing else, son of Kuntī, provided his whole being has always, at every moment, been soaked in that state. To be soaked in it simply means this: through remembering it again and again, it becomes second nature, something practiced into you — and that practiced familiarity is what carries you into it at the last moment.
Close to the Sanskrit
Not with reference to me alone is this rule. What then? —
Whatever, or indeed whatever — that is, whatever state, a particular deity — remembering, contemplating, a person gives up, relinquishes, at the end, at the time of the end, at the time of the departure of the vital breath, the body, the physical frame: that very state, that very remembered state, he attains, and no other, O son of Kuntī, always, at all times, being one whose being is steeped in that state — 'steeped in that' means: being that occurs in that is 'that-being'; he is 'bhāvita,' made habitual, by being repeatedly remembered, practiced — by which he becomes one whose being is steeped in that state, being so.