8:6
यं यं वापि स्मरन्भावं त्यजत्यन्ते कलेवरम् ।
तं तमेवैति कौन्तेय सदा तद्भावभावितः ॥८- ६॥
yaM yaM waapi smaranbhaawaM tyajatyante kalewaram ।
taM tamewaiti kaunteya sadaa tadbhaawabhaawitaH ॥८- ६॥
Source: Automatic ITRANS Transliteration
Whatsoever condition is remembered upon giving up the body,
That very condition, son of Kunti, is always achieved.
Source: Milind S. Pandit
Remembering whatever object one leaves the body at the end of life, one attains that object, O Arjuna, because of the constant thought of that object (one remembers that object at the end of life and achieves it).
Whatever state of being one remembers when he quits his body, that state he will attain without fail.
Source: Bhagavad Gita As It Is