This is always a very difficult decision and heartbreaking topic. I am so sorry that you are faced with this.
Personally, I always lean towards the quality of life. If he is suffering, then you have your answer. If you are really uncertain, ask your vet for an honest open discussion and his/her opinion. Ask this question to your vet: If this was your loved one, what would you do. Use the word 'loved one'. If your vet is a sensitive vet not looking for an extra buck - you will get an honest answer.
I cannot advise on what you should do. Look deep inside your being..the answer is there.
Whatever you decide, please know that you are not alone. We at pets go through these decisions everyday. We all know what it is like to prepare, fight or loose a very cherished member of our family. Together we help one another out in our times of need.
Best to you.
. Make peace with whatever decision you take.