I am so sorry you are going through this, this has been my 'thing' for yearsssssssssssssss... now. It is awful, believe me. I was diagnosed with OCD back at age 21 and am age 32 (nearly 33) now. I've had the more common obsessions when I was younger, prior to taking multiple courses in psychology. Once I entered the land of self-diagnosis and google, my obsessions ran the gamut. My main thing is, (and believe me I know this sounds absolutely crazy) my own thoughts are in the 3rd person, almost as if I have an imaginary friend.
I know that sounds absolutely bonkers and nuts. I know (at all times, and have not ever lost sight of this) that this is always my mind, that I am not 'hearing things' and so forth. Still, because of the body's response to anxiety, some symptoms can mimic the feeling of 'losing it' or 'losing control'. That is to say, depersonalization is a result of the chemical reaction we experience as faulted by anxiety. I don't know if that makes any sense....but, I can absolutely relate to what you're going through. Hopefully it helps to read through my post.
Feel free to message me if you want. As always, the fact that you and I , or anyone else on here experiencing bizarre thoughts questions our 'sanity' is proof enough that we are 'sane' individuals.