Bhagavad Gita 8.6

यं यं वापि स्मरन्भावं त्यजत्यन्ते कलेवरम् |
तं तमेवति कौन्तेय सदा तद्भावभावित:

Translation

Whatever one remembers upon giving up the body at the time of death, O son of Kunti, one attains that state, being always absorbed in such contemplation.