Sorry for your loss. It looks like he had an internal tumor. I've seen this a few times. This is a very common occurance in goldfish.
After losing some 8 year old fish due to a busted tank seam I'm taking some time off from them personally. Keeping shorter lived tropicals now.