His tail was bitten off around six months ago but he was fine up until about 3 months ago. I know I was overstocked and I've changed this.
About 3 months ago he struggled to swim to the bottom. He floats at the top. Had this before a long long time ago with another goldfish and cured it by changing their food. But this one isn't getting any better.
I've tried peas, all the medicines they stock at my local pet shop but nothing is helping. I've noticed over the last fortnight his sides are becoming pink/red. It looks painful. I've uploaded a picture.
Is euthanasia the best option? He been in his own tank for the 3 months since getting ill. For about a week now he's been unable/not had the energy to swim to get the food I put in.
It's never an easy decision to make but in my opinion if the fish no longer exhibits healthy behaviours, i.e swimming normally, eating normally, looking active etc and this continues for a prolonged period of time then ask yourself if you would want to continue living in that condition.
Without sounding selfish you also have to consider the other tank inhabitants, if he is weak / ill and showing no obvious signs of recovery he is much more susceptible to disease (if he hasn't succumbed already of course) which could then be transmitted to other currently healthy fish and you have a responsibility for their well-being also.
Sounds like you have tried everything you can to me, best not to keep him suffering any longer.
If you decided to euthanase then the clove oil method is considered to be the most humane, I think there is an article on it on here somewhere.
Having had goldfish in a similar situation (the floating at the top aspect), the only other options I would suggest are trying feeding live bloodworm in an effort to 'clear him out' (in case there's a blockage of any sort contributing to this) and aquarium salt (plus raising the water temperature slightly). I found both to help, often seemingly miraculously giving the fish a new lease of life for some time.
Having said that, whatever was wrong did "catch up with them" eventually, which I think will/has happened here, and it does seem as though yours is much further down the line if not responding to medicines, not been able to get to food and particularly with the sides changing colour. It looks as though either nature is going to take its course within the next week or so, so helping the situation may indeed be the best option as maccy_g suggests.