First thing I'd do is test the water with a liquid water test kit to see the levels of the ammonia, nitrites, nitrates & Ph. What I would do next depends on the results. BUT if you do not have a liquid test kit I would do a 50% water change with temp matched, conditioned water. If you are running the filter it is imperative that you test the water daily or automatically do frequent water changes to keep him healthy. Does he have tank mates? If so what are they? If he's willing to eat then feed him, when feeding flakes break up 2-3 med-large flakes. I suggest switching to pellets as they are easier & substitute a meal or two each week with frozen blood worms, brine shrimp or daphnia. You need a hang in water thermometer (some call it a floating thermometer) so you can ensure the temp is staying steady.