On the grounds that, a steady devotion towards God, which perfected overtime while living, culminates into a habituated disposition of remembering the God alone, even when senses and organs have become extremely weakened, seems to be point emphasized in various references
Bhagavad Gita 7.30( that sets the context for chapter 8 - sambhandhokti)
Swami Madhusudana Saraswatis Commentary
And it is not to be apprehended that My devotees who have attained such a status forget Me due to the failure of their organs-even at the time of death, because ye, those who; viduh,
know, think of, mām, Me; sādhibhüta-adhidaivam, along with
My existence in the physical and the divine planes; and sădhi-ajñam, along with My existence in the sacrifices; te, they;becoming yukta-cetasah, concentrated in mind, having their
minds ever absorbed in Me as a result of perfection in that (habit
of concentration); viduh, know, through My grace; mäm, Me,the all-pervading Self; prayāna-kāle api ca, effortlessly-as
suggested by the word ca-even (api) at the time (kāla) of death
(prayana), even when all the organs have become extremely
Unsteady at the time of departure of life. On account of the
Perfection of the habit (of concentration) acquired previously
they, even at the time of death, come to have a mental modification that takes My form alone. And, as a result, they indeed
become self-fulfilled through the Yoga of Devotion for Me. This is the idea.
Chandogya Upanishad 3.14.1
सर्वं खल्विदं ब्रह्म तज्जलानिति शान्त उपासीत । अथ खलु क्रतुमयः पुरुषो यथाक्रतुरस्मिँल्लोके पुरुषो भवति तथेतः प्रेत्य भवति स क्रतुं कुर्वीत ॥ ३.१४.१ ॥
All this is Brahman. Everything comes from Brahman, everything goes back to Brahman, and everything is sustained by Brahman. One should therefore quietly meditate on Brahman. Each person has a mind of his own. What a person wills in his present life, he becomes when he leaves this world. One should bear this in mind and meditate accordingly.
The Upaniṣad says here to think over this with kratu—that is, with great effort, and with deep concentration.
Kratu also means will, or will power. It is your will that decides your destiny.The Upaniṣad says here to think over this with kratu—that is, with great effort, and with deep concentration.
Commentary translation Swami Lokeshwarananda
Prasno upanishad 3.10
यच्चित्तस्तेनैष प्राणमायाति प्राणस्तेजसा युक्तः ।
सहात्मना यथासंकल्पितं लोकं नयति ॥ १० ॥
Of what thought, by that he attains prana, the prana combined with udana along with the atman, conducts to the world thought of.
Sri Shankaracharyas commentary
Of what thought he is at the time of death, by that thought, i.e., volition, he attains along with the senses, the prana, i.e., he puts forth the activity of the chief Prana. The meaning is that at the time of death, the activity of the senses having declined, he lives putting forth the activity of the chief Prana alone. Then his relations around say ‘he breathes and lives’; and that prana manifesting the activity of udana (tejas); with the atman with the owner, i.e., the enjoyer. The prana manifesting the activity of the udana alone, leads the enjoyer to worlds (bodies) thought of, according to the influence of virtuous and sinful karma
translation
Sri Sitaraman Sastry
Dr. S Radhakrishnans commentary BG 8.5
The importance of the state ot mind at the moment of death emphasized in the Upanisads. Chindogya, IIl, 14, 1; Prašna, I 10. We will think of God in the last moments only if we are devoted to Him previously also
Dr. S Radhakrishnans commentary BG 8.6
The soul goes to that on which it's mind is set during the last moments.What we think we become.Our past thought determine our present birth and our present ones will determine the future