Resonant states in semiconductors: A quantitative study of HgSe:Fe