Good luck, OP. Anxiety is so evil.
Tbh, they way the media talks about things 'harming' babies in the womb really makes me angry. It creates low level anxiety for many women, and in some cases helps trigger awful episodes like yours.
Just want to suggest some thoughts that might be worth considering (to be clear, I understand how difficult it might be too accept them when feeling anxious though)
A CBT approach can be good, it could help to find out what a lot of the narratives you fear amount to in reality. You get screaming headlines about 'x harm babies', which makes it sound like doing something once or one thing happening will result in a terribly ill or disabled child. Usually the real story is that scientists have found that there might possibly be a link between doing something really repeatedly and birth defects. To put risks in context, IIRC, even a MTB who is medically classed as alcoholic only has a 10% chance of giving birth to a child with fetal alcohol syndrome, for example. But it's often talked about as though one drink is all it takes.
It might help to try to remember, our mums drank, smoked, ate 'risky' foods etc all through their pregnancies with us in all likelihood.
The other thing is what 'harm' means. We endured terrible stress during the last few months of my pregnancy. So bad that I couldn't eat for two days at one point. DD is an anxious child. Could it be caused by that stress? Maybe, maybe not. Is her life ruined by that anxiety? No, it's something for her to contend with, it's not ideal, but it's not a disaster for her life either. 'Harm' often means 'a suboptimal result' and 'increased risk' means 'a slightly raised risk of something that is extremely unlikely in the first place'