They are not dead who live in the hearts they leave behind.
— Tuscarora saying
Caring for someone who is dying can be hard. And, unless the death is unexpected and quick, there are choices to be made when the time comes. These may not be easy. Planning ahead  and working with the healthcare team can help you provide needed comfort.
You will probably remember for a long time what you do for someone who is dying. Realize that this is a difficult time for you, too. Being a caregiver  for someone at the end of life can be physically and emotionally exhausting. In the end, accept that there may be no perfect death, just the best you can do for the one you love. And, the pain of losing someone close to you may be softened a little because, when you were needed, you did what you could.