I think the fact that you know how unreal your thinking is, how elaborate the narrative is to pin this on your ex, and the fact that it has this obsessive quality are all points in your favor. The capacity to reflect on our own unhealthy patterns is the first step in correcting them.
Of course this isn’t a diagnosis of OCD, but I can certainly understand why you would think it is. In fact, as you will learn about in the article below, a hallmark of OCD is that the person recognizes that their thoughts or behaviors are senseless or excessive. This is important because the you that is recognizing this is the you we want to have make the correction.
I highly recommend and evaluation by a clinical psychologist or psychiatrist. They can help determine it this is, indeed, Obsessive-Compulsive Disorder, and what the best way to treat it would be.