Marijuana helps me (and many others) with anxiety when I feel it. Odd that it worsened yours. And unfortunate that you had to resort to meds to make you feel good.
There is a root cause to the anxiety and panic attacks and if you discover that rather than just mask the symptoms your problem will be much smaller and easier to deal with.
With me, I find the root and deal with it, and use MJ if necessary to manage the symptoms to enable me to move forward with my "cure"

It was much worse when I simply masked the symptoms...the problem was always there regardless...waiting for me to deal with it.
Pills or pot wont make it go away, just distract you from it for a while.
This is not a solution. Used as a management technique to get it under control is safe enough but denying yourself resolution is not.

Peace.