This medication is used to treat dandruff and a certain scalp infection (seborrheic dermatitis). It reduces itching, flaking, irritation, and redness of the scalp. Selenium sulfide is also used for a condition that causes discoloration of the skin (tinea versicolor). This medication belongs to a class of medications called anti-infectives. It works by slowing the growth of the yeast that causes the infection.