More info is needed to determine what the issue is.
What makes you think he's dying? Is he wounded?
What size tank do you have, how big is the foxface (in inches)? Also, what tank mates are you housing him with?
I ask this because Foxfaces are a weird fish. They happen to be my favorite and I have kept many. They need a larger environment in order to thrive. They are pretty active and will grow quite large. Also, they are very temperamental fish. They have a lot of attitude and can be easily effected by their tank mates/environment.
If the fish is discolored, this is normal. When they are upset/scared/being bullied/mad, they will turn a sort of mottled brown color. This will go away on it's own, as long as the problem is fixed.
Some days, foxfaces just wake up on the wrong side of the bed. They are grumpy. Sometimes, there just isn't anything that you can do.
Can you explain everything that has happened, up until you posted this thread asking for help. Hopefully, someone else will offer some advice. Any info you have will help solve the issue.