Our Gemara on Amud Aleph discusses the plight of a pious person who suffered pain in his heart. He was recommended a treatment of fresh goat's milk suckled directly from the goat, which involved a violation of rabbinic law of keeping cattle in Eretz Yisrael. His colleagues criticized him for this transgression.
Maharsha asks, why should he be held liable as this was apparently a serious medical condition? He answers, perhaps this was a condition that was not life-threatening and he should have refrained.
It is hard to imagine one could have pain in the heart and it would not entail danger. Yet there is such a modern affliction known as a panic attack. A panic attack can include symptoms of extreme chest pain and mimic sensations of a heart attack. Perhaps this is what the fellow was experiencing. Interestingly, goats milk seems to raise dopamine levels, which might be helpful in modulating anxiety. (See this study: https://www.mdpi.com/2218-1989/13/4/497 and this study: https://pubmed.ncbi.nlm.nih.gov/26317601/ )
A person may have a random panic attack once or twice in his lifetime, and no treatment is necessary. However, others might have them frequently causing even more fear and panic about them occurring in public or while driving. Some have panic attacks while sleeping, suddenly waking up with intense fear, sweat and shortness of breath.
Treatment for panic attacks can be both via anti anxiety medications such as SSRI’s and various modalities of talk therapy to either address the unconscious fears that are causing the anxiety or to develop coping mechanisms when the attack occurs, such as breathing exercises and acceptance, and to address distorted fears and beliefs. The therapy can involve a form of exposure therapy, gradually re-creating and triggering the symptoms of a panic attack in a safe, repetitive manner, while learning to tolerate them. Once the physical sensations of panic no longer feel threatening, the attacks begin to resolve.
My personal experience and approach involves using cognitive behavioral therapy to bring immediate relief, and then to also consider the life situation and possible reasons that might be triggering these feelings. Medication is a personal choice. Some clients feel medication is stigmatizing or covering up the root cause, which I respect. At the same time, a cost benefit analysis should be made, especially if the talk therapy is not alleviating the symptoms. One can discuss the philosophy of medication and if it really represents avoidance of the issue or it is just a helpful tool, but why philosophize too much when the suffering is strong and not getting better, while the medication can bring relief?
Sources:
https://www.mayoclinic.org/diseases-conditions/panic-attacks/symptoms-causes/syc-20376021
https://www.mayoclinic.org/diseases-conditions/panic-attacks/diagnosis-treatment/drc-20376027