Good for you for spending time with him and helping the family out. Your a good friend. Its tough to go through but you were there to help and that's what matters. It speaks of your character.
I had an old friend that I was in the Army with back in the 70's. He called me about 6 months ago and told me he had 2 weeks to live. He said the doc told him he was ate up with cancer. He was a Viet-Nam vet and saw his share of combat with the 1st Cavalry Division. We deer hunted and fished together a lot in our younger years. He moved to Michigan and I live in Florida. Last time I saw him was about 6 years ago. He called to say Good by. It was a tough phone call. I wish I could have been there for him.