i'd agree with the possibilities so far, and in that case, there was nothing you could have done except be there for him, so at least you were there.
might have been hard for you, but it was the last thing ever for him. maybe with some more random details we could know better. poor thing.