While it is a symptom of OCD on some levels it is also a symptom of SA. If it's social situations you are obsessing over it's mostly likely what it is. I used to do this all the time, I still do but not to the same level that I used to.
Last night I was going to class and a woman stopped and asked me directions to the bookstore. I was confused by her accent for a second, my heart was pounding and wondering why she chose me (they ALL choose me, I must look personable or something), and I kinda stared at her a moment and asked her to repeat herself. Then I puzzled over it a moment, gave her the directions the whole time thinking "i'm going that way myself, why don't I just walk with her? But then she'll want to talk to me, I don't want to do that, crap." So i gave her the directions and proceeded to walk slowly so she wouldn't know I was following her. In crossing the courtyard I saw her go in and talk to the lady at the info desk who directed her exactly where I told her to go, I waited outside until she passed so I wouldn't bump into her.
I turned that interaction over and over in my head many times since then wondering if I should have just walked her there, did I give the instructions clear enough? Did I look like I had no idea what I was talking about since she had to stop at the info desk? etc. etc. I just have to tell myself I did the best I could and force myself to think of something else. It takes a lot of effort and practice but eventually you get better at it.
I still think about the and worry what I could change but it no longer keeps me up at night.