Candida produces a myriad of neurotoxins. And neuro + toxin = brain being negatively affected. Could be a simply as that.
...OR could be you are lacking in one of the main electrolytes, B vitamins, zinc the list goes on.
Maybe you could share what thoughts you are having. Or what you mean by obsessive. I mean there are lots of folks with Obsessive compulsive disorder. Or are you referring to a weird thought or impulse you cannot stop thinking about? An overly active mind?