I think the answers given here about letting your horse tell you when it's time are the right ones.
In the meantime, give your friend as much love and comfort as you can. And when the time comes you will know you did all you could to give your horse the best life it could possibly have here on earth.
I know there will be many people here who will share your sadness and be of great support.
Your horse is very lucky to have you as his friend and advocate.
Be at peace with yourself and whatever decisions you make.