I would put him in a hospital tank with all new, freshly made water and a bubbler with a sponge filter. Try to match the PH and temp of his current system. Leave him in the dark and let the water cool if it will, but to no less than 70. After a few hours, try to get him to eat. Tiny, live ghost shrimp will be best. They will not foul the water and most horses eat them with relish. I would leave him that way until he begins to look better, unless he develops some sort of obvious disease. Mela fix or a dose of stress guard couldn't hurt.
While you are doing that, do a larg-ish water change on his original tank. Check and re-check the params. Try to lower the temp if possible. Promote top of the water circulation - it could be he just doesn't get enough air towards the bottom.
Good luck with your pony, and be sure to post if you see any obvious signs of trouble - white spots or patches, sloughing off, etc.