I lost my dad last year to esophageal cancer. It was extremely tough leading up to his death as I'm 4,000 miles away from him. I managed to get over and see him about a week before he passed, and he got to meet my little boy - which he was really holding on for.
It was such a relief when he finally died. He was in agony and had absolutely no dignity left. It's absolutely shocking to me that he was forced to go through that (but that's a whole other thread I guess) so to know he wasn't suffering anymore was a HUGE weight of our minds. After the funeral we were all laughing, joking, and remembering him as the awesome guy we knew before the cancer. He wouldn't have wanted it any other way.
Sorry about your friend.