Bhagavad Gita 8.5
Whosoever, at the time of death, thinks only of Me and, thinking thus, leaves the body and goes forth, will assuredly know Me.
अन्तकाले च मामेव स्मरन्मुक्त्वा कलेवरम्।
यः प्रयाति स मद्भावं याति नास्त्यत्र संशयः॥antakāle ca māmeva smaranmuktvā kalevaram|
yaḥ prayāti sa madbhāvaṃ yāti nāstyatra saṃśayaḥ||
English translation (above): Shri Purohit Swami (1935), public domain. Sanskrit text via github.com/gita/gita (Unlicense).