I'm not sure if this would work in a closet, but it sure works on musty books.
For a book, you take a catbox and fill it with kitty litter, and place the book on top. Put the whole pile of stuff in a trashbag and close it and leave it for a few days - and the smell has been absorbed by the litter.
Maybe if you empty the closet and clean it (and if it still smells, obviously) you could put a pan of litter on the floor and one on a shelf, if there is one, and close the closet for a few days, that would work?
You could also put some bits of cedar in there, maybe those hangers with cedar on them?