I'll echo what others have said about meditation and daily routine. If cannabis is consistently giving you bad experiences, it is probably a good time to take break. Because the mental and physical body are so connected, in almost all mental illnesses, an improvement in physical health can help manage less desirable symptoms. In my experiences, things like a healthy diet and sleep ESPECIALLY have helped me with racing thoughts.
I think one of the best things you can do is confront this anxiety. Is there a pattern to this anxiety? Recurring themes? If so, ask yourself..... is there reason to be anxious about these things that keep buggin me out? If so, DEAL WITH THE PROBLEM! Sometimes anxiety is just something being repressed that needs to be turned around.
Now with that being said, sometimes anxiety seems to surface in every aspect of our lives, over trivial things where worry is absolutely not warranted. It can be debilitating, even. But again, I encourage you.... when these panic attacks happen, get to the root of them! Is there a valid cause for concern???? If not..... try as hard as you can to let it go. This is where meditation comes into play, for me. It doesn't always work, but it's all you can do, and most of the time it will at least make things easier to deal with. My parents were/are perfectionist and growing up, nothing I did was right. Everything was critiqued and I was constantly being yelled at. It took me years to realize that this was why I was anxious of messing things up; in my eyes, if I hadn't done something as best as I possibly could, I would just sit there and freak out.... it was mushrooms that taught me that in the end, it doesn't actually matter a whole lot whether or not I get a B in history and not an A. Or whether or not I look like a slob in public. Or whether or not I like sports. Or whether or not I cut my food with my fork perfectly upright in my right hand and knife horizontal in my left, setting down my knife in between bites. I tell ya, they are nuts.
So yeah, try and figure out whether or not there is a validity to these anxious episodes, and (try to) confront them! It may not do anything, but I have a feeling it might.
Also, while it is absolutely true that mental disorders such as anxiety and depression can be linked to chemical imbalances in the brain..... does correlation always equal causation? Something else to think about.
I wish you nothing the best of luck!!!!!!!!!!!!!!!! Much love.