IMO:
If he is still eating he is still wanting to live. Most animals quit eating when they want to give up and the pain is too much. They have more wisdom then you think.
I would separate him into his own smaller tank, lower water levels, baby him and see how he does. Go with your gut. I always do.
The fish will let you know.
If he sits in a corner and seems to give up, then and only then, would I euthanize.
I've seen animal miracles, that I bet would astound you.
Including my own dog that had a broken back and recovered. Everyone was against my saving her but I went on to have almost 12 more yrs with her. It was worth it.