Hi Glad
I used to get stuck sometimes when I was walking along the pavement and I saw dog excrement on the ground. Although I wasn't standing on it, I felt anxious that I really was standing on it. I could see a clear gap between me and it, but I still wasn't convinced. This caused me much embarrassment because passers-by saw me standing there and thought I looked suspicious! Well, at least you can deal with this problem in the privacy of your own home.
A tentative suggestion is that you remain standing there for however long it takes to bring your anxiety level back to normal. During that time refuse to sort out the thoughts in your head. Just leave them alone and don't think about them. Instead focus your attention on bringing your anxiety down by means of slow deep breathing, relaxing your muscles, imagining yourself in a beautiful floral garden or sunbathing on a Mediterranean beach, telling yourself a few jokes, humming soothing music, or whatever. When you finally feel calm enough to move on, don't be afraid of your anxiety returning. As you step away from your fixed position, the more you are afraid of a resurgence of anxiety, the more likely it will resurge with a vengeance. But if you defy its threats and boldly step forward with gung-ho confidence, I think it is more likely you will be able to shake off the anxiety and it won't cling to you.
Good luck!
Parvez