I know how you feel, first hand. Been through it more than a couple times with older cats, including one who had liver disease and kidney failure at 17.
You've obviously loved this guy and cared for him very well in order for him to be 17. If your vet has suggested euthanasia, it's something not done lightly. Sometimes, the hardest thing we have to do, is let go. To really love them enough to make a decision for them, not necessarily ourselves. If we can't cure them and give them more quality years, we have to be selfless and help them go rather than make them linger.
During the end, nothing you can do will make him eat (or drink) or alleviate the discomfort, fear or pain. I'll never forget the first time I had to face this, a very wise and compassionate vet told me to consider only this: "Is he having more good days than bad? Is life more quality time and pleasure than pain and misery?"
This isn't easy and it's a decision only you can make.
This link may help further http://www.avma.org/communications/brochures/euthanasia/pet/pet_euth_brochure.asp
I wish you and your companion peace
God bless,
Many have forgotten this truth, but you must not forget it.
You remain responsible, forever, for what you have tamed.