I get the black dog sometimes myself. (Although I have a black dog in real life, my black Lab mutt, and he's actually very cheery).
I have to watch for that all the time I think. I just try to act as if I'm good, being with people is important for me, exercising, doing fun stuff occasionally, cleaning the house, etc. It took me over 40 years to figure that out!!! Glad to hear it sounds like you're aware of that stuff now too. Maybe a huge part of dealing with the "dog"....