I recommend that when you practice Metta Bhavana, in whichever method you use, you embrace your friend with your attention and extend thoughts of loving kindness, compassion, equanimity and sympathetic joy towards him, as with all other beings. As you do so, you may also extend the aspiration that your friend be filled with each of the four divine abodes in turn.
I would describe myself as a simple meditator so I am not familiar with some of the rituals within Theravada. What I do to dedicate my merits is to think of the family member, friend, unknown person and make the heart-felt aspiration that the person share in my merits, share in the Dhamma and may they become liberated.
You don't need to be in sitting meditation with closed eyes to practice this. In fact, during the next day if you have the opportunity to attend to your friend, do so while at his bedside.
I also suggest that you also make the object of your metta bhavana and merit sharing your friend's loved ones and friends - not least of all - yourself.
Maintain your daily practice of samatha/vipassana as you will need this to ground you during this volatile time. At anytime you feel yourself losing the balance of your mind, switch to your usual method of meditation and just observe
Also, I recommend that you be of service to your friend and his family and assisting with whatever is required. From either sitting by your friend's side or offering support to his nearest and dearest or providing meals etc.
All the best Tex. I attended my father during the last three days of his life. You will be in my thoughts.
“No lists of things to be done. The day providential to itself. The hour. There is no later. This is later. All things of grace and beauty such that one holds them to one's heart have a common provenance in pain. Their birth in grief and ashes.”
- Cormac McCarthy, The Road
Learn this from the waters:
in mountain clefts and chasms,
loud gush the streamlets,
but great rivers flow silently.
- Sutta Nipata 3.725Compassionate Hands Foundation
(Buddhist aid in Myanmar) • Buddhist Global Relief