Can you post the full list of parameters such as ammonia, nitrites, ph?
I have never had luck with pellets for my gobies (other folks might have success but I haven't) so I don't even try anymore so unless you saw him eating pellets at your lfs I would be skeptical of this. Did they say they were feeding pellets? Do you know if they are wild caught or captive bred? Captive bred should have no issues with prepared foods like frozen but again I'm skeptical of pellets.
I only feed live or frozen. Mostly frozen now but sometimes it takes patience to get them to take frozen if they are wild caught. Most carnivorous gobies find their food by the movement of their prey so I often had to train my wild caught gobies by thawing the frozen food (brine, mysis) in tank water and sucking it into an eye dropper (purchased from the drug store if that helps) then I would shoot it out in front of them so it moves. More often than not they would leap at it. If the food settles I would use the dropper to blow it around in front of them to get the food moving again. I found when I first started if I just dropped the food into the tank and it settled they would just walk right by it. Once they were trained on the frozen then it was easy. I still dropper the food in but typically they find it even if it settles because now they know what it is.
So how old is your tank? You mentioned you had him for 2 months but is that how old your tank is? It might be too new to support his sifting ways so you'll have to supplement. Having said that he might have already been in an unhealthy state when you got him. Do you have any frozen food you can give him. I would say you definitely have to try the dropper method because he might be too weak to look for food on his own. I must say he doesn't look good. I have had a few like this. Two recovered. One didn't.
Also have you noticed any issues with the skin like white spots, etc or stringy poo? This is additional information that might suggest a parasite or disease. I don't see anything like this in the pic. He just looks thin but it's hard to see because he's so contorted.