I'm sorry that had to be quite the sight! It might not be easy to get that off but it will need to be rinsed out to avoid skin irritation and ingestion. When doing this you'll need to make sure the animal does not get too hot or cold. Its fur regulates its body temp and sudden changes can shock him. (Imagine being very warm and then getting cold water poured on you). Except it's a little more dangerous because unlike us they cannot sweat to regulate temp.
The best way is to bathe in luke-warm water that does not feel either hot or cold to the touch. I recommend doing this in a room that is very warm and have a blow dryer and towel ready. Make sure your chinchilla does not get his nose under any water or it can be fatal.
You can use a cup to run water over the soaped area and keep rubbing it and running water over it until there's no soap. Then use the blow dryer without heat after towel drying and make sure there it's very dry.