Difficult topic. It is important to understand, however, that seborrheic dermatitis is a chronic condition easily set off by emotional, climatic and digestive causes. What does this mean? Well, it means that I have to say what most people don't like to hear: you are the biggest contributing factor to this condition.
There is good news, though. Just as easily as you can provoke the appearance of lesions, you can also make it all go away. If you don't believe me, then just look at what you wrote. You say that it was limited to your scalp, the treatment didn't sit very well with you, which probably caused a good deal of anxiety, which caused the lesions to spread.
You may think I'm insane, or that I'm just a jerk for telling you that "it's in your head", but I can tell you from personal experience that this is true. This means that the first step to a dermatitis free life is accepting the fact that your anxiety or other emotional alterations are causing this.
Unfortunately, the shampoo (ketoconazol) is the only indicated treatment for scalp. The side effects do not sound like fun, but if they are better than the dermatitis, then continue the treatment as indicated. But as you're doing that, think about what I have wrote, and maybe research a bit on the relation of seborrheic dermatitis with anxiety and depression.
You are the problem, and you are the solution. Good luck.