Chapter 8 - Verse 6

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

yaṃ yaṃ vāpi smaranmāvaṃ tyajatyante kalevaram .
taṃ tamevaiti kaunteya sadā tadbhāvabhāvitaḥ .. 6 ..


Of whatever Being thinking at the end a man leaves the body, Him alone, O son of Kuntī, reaches he by whom the thought of that Being has been constantly dwelt upon.
Read the commentary

Being: a particular Devatā or Diety, At the end: at the time of life’s departure. Him alone: Only the Being thought of, and no other. Dwelt upon: constantly meditated.

Because thus the final thought determines the character of the body to be attained next,