Vicodin and panic attacks

Yes, I know, we shouldn't take drugs while pregnant. I completely agree. But my doctor said no to Xanax and at 4am last night after three separate panic attacks (each getting progressively worse) when my heart was pounding in my ears, I finally went ahead and took a Vicodin, because it's been known to calm me down. We saw the babies yesterday at 17+3 and they were marvelously healthy, so I figured I was not exactly teetering on the edge of health. 
Not only did it not put me to sleep, but now I can't stop stressing that I've somehow killed these otherwise healthy babies. I know the stress is even worse than the drugs, but I can't seem to avoid full-on shaking panic mode and it's killing me. I need positive testimonials, please.