Is it true that the next life depends on our thoughts while dying?
BG 8.6 — Also [when] the body is left remembering whatever "Nature" at the end, O son of Kunti, [it] always approaches towards establishing those nature(s) only.
This is further confirmed by below verse, which though said in the context of the Yogi-s, is applicable to all. i.e. we carry forward the practices/samskAra-s of our past births.
BG 6.44 - For, by that very past practice, he is carried forward even in spite of himself! Even a seeker of Yoga transcends the result of the performance of Vedic rituals! (tr: Gambhirananda)
Also refer my answer in: According to Hinduism, what do we carry into afterlife and next birth?
Out Mann / mind is carried to the next life.
Also as per Gita, if a person dies thoughtless, then attains liberation. The other way of calling thoughtless mind is, the mind which is concentrated in the thoughts of "Me" alone. Refer BG 8.5 in this answer's context.
Note: “The question: Is it true that the next life depends on our thoughts while dying?” is licensed by Stack Exchange Inc (https://hinduism.stackexchange.com/); user contributions licensed under CC BY-SA.