HI cav,
I am sorry to hear about your dog, it must have been very hard for you.
When dogs are in pain they sometimes try to hide as they don't know where the pain is coming from and some associate it with their environment. If he were an outside dog and was in pain he might have tried to hide in his dog house or a shed thinking is was something outside causing the pain. There are often stories that sick dogs go away from their home to die, and it may be that they actually go away thinking they are escaping the pain they feel.
Again I am sorry for your loss. The site below may help you a bit through the grief. There is a beautiful story of the rainbow bridge here. I know it helped me and many others.
www.petloss.com
dog training consultant
24 years training & behavior,pet first aide, Therapy dog eval., PA Animal Response Team