I know a lot of people feel quite awkward when they are with someone who is terminally ill. I spent some time each week a few years ago, helping to massage a woman who was in the awful throes of motor neuron disease. Her fingers, hands, arms, and feet etc would get very uncomfortable as she could no longer move them and fluid would collect, so massaging and moving her limbs helped to alleviate that.
As I would be massaging her, she would often have visitors and I would bear silent witness to the range of emotions and reactions of her and her guests as some gracefully navigated their visit and some, well some, crashed and burned, there is just no other way to put it. They would leave and I would be massaging a woman who was crying, not because she hurt physically, but because the emotional pain was just too unbearable to take anymore.
So, how to act?
Act the same way as you always did Sounds so obvious I know. The person you are talking to is the same person as before. Physically, there are changes yes. But inside, they are still the same person.
Don't patronize Now is not the time to turn into Tony Robbins and to lecture to them about how they are going to beat this and get better while they are in the latter stages of their terminal illness and their organs are shutting down left right and centre. They're dying, not dumb!
Don't overburden the person with your own emotions I have seen this a few times when the visitor is so emotional and sad that their friend/family member is dying that the person who is sick and dying ends up having to try and comfort them and make them feel better instead of the other way around! No one wants to be reminded over and over that they are dying and how miserable it is - they get it. The person you are visiting is trying hard to hold it all together, you try too.
Be sensitive If there was ever a time to 'read the room' now is it. The person you are visiting is going through a lot and today they may want to talk about everything except their illness. Or they may want to talk about it. Or they may just want to listen while you talk. Or they may want you to be silent with them. If in doubt, ask them what they want to do or talk about!