You poor old thing, I can't imagine how frightening it must be for you. My house is full of them & give me such a lot of joy.
I wonder if it would help you to learn a bit about the behaviour & psychology of cats & dogs. If you understood a little more about why they act the way they do & how they perceive the world..it might help you to predict what they are likely to do & you would be a lot more in control.
For instance, if you are wary of a dog in the street, my guess is that you are looking at it & your body language is awkward..which a dog will interpret as possibly a challenge or fear. You might unknowingly be putting out exactly the wrong signals.
Finding out about cats & dogs might provide you with some confidence that you can convey the right messages when you are confronted with them & could put you back in control.
Good luck