You need to consult a doctor, Farzana.
There are two treatments for OCD, medication or psychotherapy, specifically Cognitive Behavior Therapy. You doctor will be able to guide you to the best treatment option for you.
If it were my middle finger, yes, I'd worry. Did you traumatize it? In other words, bang... up just about anywhere.
Since I can't think of a benign reason for your middle finger (or any, for that matter) to turn purple, I'd...
Don't mean to sound sarcastic, but the same way you would treat any dog bite on the finger..with respect and concern.
Immediate cleaning of the wound with soap and water, pressure for any continued...