In the context of the mind at death, the following articles by Andrew Holecek may be helpful. They are from his website — https://www.andrewholecek.com/ — and appear under the section entitled “Preparing for a Good Death”
After Death States: The Bardos in Tibetan Buddhism
What Is the Best Way to Prepare for Death?
What’s The Best Way to Help Others As They Die? Advice From Buddhist Masters
Shamatha Meditation as a Preparation for Death
Make Your Spiritual Wishes Known by Writing a Dharma Will
Reflections on Death from Tsoknyi Rinpoche

Our State of Mind at Death
Our mind beyond death involves the story of our bodies and minds, our birth and death, and the undeniable truths about our existence as human beings.
While we know the facts of life and the inevitability of death, it is a reality we rarely face. When we do, our impulse is to turn away.
Though we do not wish to confront death or the fear it inspires, running away from this inconvenient truth will not help us. Reality will catch up to us in the end.
If we have ignored death all our lives, then it will come as a big surprise. There will be no time on death’s bed to learn how to handle the situation, no time to develop the wisdom and compassion that could guide us skillfully through deaths terrain. We will have to confront whatever we encounter there as best we can—and that is a genuine gamble.
Why would we take such a risk? We have a choice: to prepare ourselves to face the most uncomfortable moment of our lives, or to meet that moment unprepared.
If we choose to look into the face of death directly, then we can be certain of transforming that meeting into a profound experience that will bring untold benefit to our spiritual journey. …
To go beyond our abstract notions about death, we have to look deeply into our own minds and hearts. This journey requires that we contemplate what death means to us individually—not from the medical or technical points of view—such as the cessation of respiration or the beating of the heart, and not from the perspective of our religious or cultural traditions.
Instead, we need to ask ourselves, “What does death mean to me, personally, from my own experience of life? What is my most basic, visceral feeling about what death is?” This is an important question, because how we define death largely determines how we will experience our own. It also becomes our guide for how to die well.
(Source: Based on Dzogchen Ponlop, Mind Beyond Death)