Dear Bluebicycle,
I'm so very, very sorry these impulses are assailing you. Sadly, I have had similar experiences and they scared me.
I try to comfort my brain when it is generating scary thoughts. Some part of me realizes that my brain is hurting and that this is why it is generating unwelcome thoughts and feelings.
What helps me is to think of my little brain as a small child in my care. I try to comfort it. Sometimes I just tell my brain "I love you little brain." over and over again. Not sure this would help you or others struggling with the same issue.
So sorry I do not have anything really wise or profound to offer. Hopefully others here will.
Wishing you only good things! -- Yao Wen.