Yes, it’s possible that shaving might improve your skin condition, but you should really see a doctor and get a proper diagnosis. Then you’ll know what you’re dealing with and the best way to treat it.
I personally wouldn't take the chance of letting a razor touch my head until that problem is resolved. It's good you're seeing a doctor about it.