Okay. That tank is almost 80 degrees Fahrenheit, which is WAY too hot for a goldfish. Those temperatures are literally killing him. Do you have a clean plastic bag and some ice-cubes that you can float inside the bag in the tank? You would have to be very careful as those ice-cubes aren't water-conditioned--generally I'd suggest a frozen water bottle, but this needs to be done immediately--so if you can find a way to clip the bag to the outside of the tank and just float it partially inside, that would help.
I personally have not had good luck with melafix or pimafix, but if they're helping your fish, by all means, continue. Right now, however, the key is to lower that water temperature and the toxins in it. You don't want to shock the fish further, so it can't be a giant bag of ice, just a few cubes to gradually begin to cool that hot water. Goldfish prefer water 15 to 20 degrees cooler than what you have right now, to give you an idea of the stress he's under.