Aww that's so sad
I know just how you feel. Our Samoyed secluded himself and quit eating shortly before we put him down. We tried everything to get him to eat and I took him to the vet and everything to see if they could help him. The vet said he was just old. My grandpa put him down about a week later I think.
It was so hard to watch him get worse by the day.