Last summer I had to decide the same thing about one of our cats, he was 19 years old and we could see him failing every day. On his last day I just knew it was time, can't explain how I knew I just did, I'm sure that you will also know when the time is right. We had the vet come to our house to do the "deed" as we didn't want him to feel any distress, but to be around familiar things and the people who loved him, it was the right thing for us to do for him. A few weeks afterwards I found this poem, I wished I'd been able to read it before I had to make that awful decision. I shall post it here for you, see if it helps you.
If it should be that I grow weak
And pain should keep me from my sleep
Then you must do what must be done
For this last battle cannot be won
You will be sad, I understand
Don't let your grief then stay your hand
For this day, more than all the rest
Your love for me must stand the test
We've had so many happy years
What is to come can hold no fears
You'd not want me to suffer so
The time has come, please let me go
Take me where my need they'll tend
And please stay with me until the end
Hold me firm and speak to me
Until my eyes no longer see
I know in time that you will see
The kindness that you do for me
Although my tail my last has waved
From pain and suffering I've been saved
Please do not grieve, it must be you
Who has this painful thing to do
We've been so close, we two these years
Don't let your heart hold back it's tears
I hope you find it helpful, I cannot remember where I found it but I've posted it here for others who found it helped.