When my hair was doing strange things, there were a few things I did, that I think helped. Took a tablespoon of black strap molasses, once a day. I read where it can be applied to hair as a conditioner. Didn't try that. The other thing I ate,for hair benetits were raw organic green peppers.
Made of paste of baking soda, rubbed that on my scalp and hair then rinse with a cup of vinegar in a quart of water, then a rinse under the shower.
For some reason covering the sores(mine looked alot like yours) with castor oil and covering it with cotton cloth seemed to help rid me of them. Something about covering them up seem to help. Good luck.