It is compassion, then, that is the best protection; it is also, as the great masters of the past have always known, the source of all healing.
Let your heart go out in spontaneous and immeasurable compassion.
Ask yourself these two questions: Do I remember at every moment that I am dying, and that everyone and everything else is, and so treat all beings at all times with compassion? Has my understanding of death and impermanence become so keen and so urgent that I am devoting every second to the pursuit of enlightenment? If you can answer "yes" to both of these, then you really understand impermanence.
At every moment in our lives we need compassion, but what more urgent moment could there be than when we are dying? What more wonderful and consoling gift could you give to dying people than the knowledge that they are being prayed for, and that you are taking on their suffering and purifying their negative karma through your practice for them?
Even if they don't know that you are practicing for them, you are helping them and in turn they are helping you. They are actively helping you to develop your compassion, and so to purify and heal yourself. For me, all dying people are teachers, giving to all those who help them a chance to transform themselves through developing their compassion.
This dying forces you to look into yourself. And in this, compassion is the only way. Love is the only way.