Bhagavad Gita 8.5

अन्तकाले च मामेव स्मरण्मुक्त्वा कलेवरम् |
य: प्रयाति स मदभावं याति नास्त्यत्र संशय:

Translation

Those who relinquish the body while remembering Me at the moment of death will come to Me. There is certainly no doubt about this.