Bhagavad Gita · Chapter 8: The Imperishable Absolute

Bhagavad Gita 8.6

यं यं वापि स्मरन्भावं त्यजत्यन्ते कलेवरम् । तं तमेवैति कौन्तेय सदा तद्भावभावितः ॥

yaṃ yaṃ vāpi smaranbhāvaṃ tyajatyante kalevaram | taṃ tamevaiti kaunteya sadā tadbhāvabhāvitaḥ ||

Whatever state of being a person remembers on leaving the body at the end, to that very state they go, Arjuna, having always been absorbed in it.

Modern context

This is the key to the previous verse. Whatever a person has been absorbed in all their life is what they will think of at the end, and where they will go. We become what we dwell on. The principle holds well before death. A person who constantly thinks about money becomes anxious and calculating; one who dwells on grievances becomes bitter; one who dwells on kindness becomes kind. The mind's habits are slowly building who we are.