Ugh...
Similar situation with my dog about 4 yrs back. He was about 18 yrs old. Losing weight, not eating or drinking, very lethargic. During the last trip to the vet, she said his kidneys were shutting down and they could hold him over the weekend and pump him full of fluids (via IV) and maybe his kidneys would come back on line. Prognosis - not good.
I took him home and they gave me a few bags of saline solution with some nutrients, tubes, needles and told me to stick him and drain 1/3 of a bag saline x3 a day and come back in 4 days. Midway through the third day, a friend stopped over when I was draining another bag of solution into him and made me realize the truth. "Look at him... he wants to go and you're only trying to keep him alive because you don't want to let him go."
The next day was his last trip to the vet. It was a very hard decision to make but I think it was the right one to end his suffering. He still remains alive in pictures, memories, and his ashes from cremation.
It's a tough thing putting a four legged member of your family down. My heart goes out to you.