My poor Truman the vet said that he has doggie senility for lack of better word to call it

About 3 weeks ago I took him to the vet because he had been walking around and crying at night. I was not sure what was bothering him and suspected his anal gland adenoma might be the problem. The vet expressed his glands, gave him and antibiotic and said the he should be much better in a few days and he did seem to be better for about a week. But he has been getting up at night and wandering around the house crying like he might be in pain. So we went back to see the vet today and he expressed his glands again. My poor little guy cried so much both times it just broke my heart but I knew it needed to be done.
I have notice that he has been walking into corners and just standing there like he does not know how to get himself out~if that makes any sense.

I assumed it was because he is not able to see very well. He also has had a very hard time finding his water bowl unless I physically pick him up and put the bowl to his nose for him to drink. It's like he has forgotten how to drink

When I put his food down he will eat part of it and then just stop unless I put him back to the bowl and bring it to his nose to finish.
Every night he now gets up at 3 AM and wanders around the house crying. If I don't jump out of bed and take him outside he will now pee on the floor so I have started putting a belly band on him at the time.
I am so worried about him I just want to cry. He looks so lost and confused when he is wandering around crying. It is a deep soulful moan.

My poor little man. I had a long discussion with the vet and he said that there really is not anything that can be done. I just pick him up and try to hold him for comfort but he really doesn't take much comfort from human contact. This is just so hard knowing that he has had such a hard life and now he is with me and doesn't even know how much I love him and want to make him final year just safe and comfortable for him.
He's sleeping now and looks like a sweet little puppy. It is just breaking my heart to see him like this. My poor Truman ................