Helping Others at the Time of Death Is a Big Responsibility 
Lama Zopa Rinpoche, in his book How to Enjoy Death says that a good rebirth depends upon dying peacefully, with virtuous thoughts. If we die with anger, strong attachment or fear, our births will only be in the lower realms.
Lama Zopa: Therefore the people surrounding the person who is dying – friends, family, professional caregivers – have a big responsibility. I will put it this way: Whatever arises in your loved one’s mind, whether their thoughts are virtuous or non-virtuous, very much depends on you and the other helpers, how you behave toward them. It is a great responsibility. If you are not careful, if you do not have this education – that the way you behave affects the mind of the person and therefore their future life – you will only harm them, not help them.
Rinpoche says that the people who help, who give advice and support, and especially the one who speaks the name of their guru in their ear when their breath stops, shouldn’t be someone they dislike; in fact there should be a pure spiritual relationship between them.
Also in order to ensure that attachment doesn’t arise in your loved one’s mind – especially when the time of death is close – Rinpoche advises that it’s best not to allow anyone for whom they have a strong attachment to be in their presence. Of course if that person can help your loved one, help them solve their problems, or alleviate their fears, then that’s OK. But if their presence merely increases their attachment, their fears of separation, then it’s very harmful, making it difficult for your loved one to let go.
We’re not clairvoyant, so we won’t know exactly what fits the mind of the person or when the right time is to explain it to them or even whether they have the karma to listen to the advice or to understand it. Check, analyze how to present the advice – the right time, the right mood – and then educate them however you can, with as much compassion as possible and as much wisdom, with skilful means.
A prayer you can say before you enter your loved one’s room and which can really help you and them is the following:
A Prayer for Helpers (Version 1)
May whoever sees me,
Thinks about me,
Talks about me,
Even criticizes me –
May they immediately be free from all spirit harms
And negative karma,
And may they complete the path,
And achieve enlightenment as soon as possible.
A Prayer for Helpers (Version 2)
By the virtues received
From attempting to help,
May all livings
Who see, hear, touch,
Or remember me –
Even those who merely say my name –
In that very moment
Be released from their miseries,
And experience happiness forever.
 Contents of this web page prepared by Len Warren of Pure Land of the Indestructable Buddha, Hayagriva Buddhist Centre, 64 Banksia Terrace, Kensington 6151 Western Australia, January 2018. Extracts from the book How to Enjoy Death: Preparing to Meet Life’s Final Challenge Without Fear by Lama Zopa Rinpoche, compiled and edited by Robina Courtin, Wisdom Publications: Somerville USA 2016, Page 65