Very sad for you, but he's had a good long life with you, it's the final act of kindness you can give him, and you will know when the time is right.
I've had to put two young geldings to sleep before they reached their 2nd birthdays, through accidents. I'm dreading when my mares (18 and 19) get to old age and having to make that decision, but it will be done if it has to.