First I am not a doctor so take my advice unprofessionally. I've read articles that poeple who are depressed or have mood changes tend to have Seb derm.
Would anyone say you have seb derm from your description? Maybe... I can't say. But can't hurt to try Nizoral shampoo. Use it every other day for 2 weeks, then use it 2-3 times a week, even when you DON'T have symptoms.
Seb derm is a chronic condition where it will come back again and again. In some people it never leaves, so consider yourself lucky.
I have seb derm and got all my blood levels checks, and liver checked. Did cleanse for 3 months, and nothing worked. Try it if you want, everything is worth a shot.