Yeah sorry to say he doesn't look great, but don't loose hope yet.
You may want to try cupping him and giving him twice-daily baths in an aquarium salt solution. Cupping him gets him out of the tank (which could have a bacterial bloom), and it makes it easier to manage bathing him. If you want...