Pinworm medicine will work only in your intestines. It is a paralyzing agent. Usually it is good to do a laxative afterwards like coconut oil, or castor oil or even olive oil. Enemas help too.
I have very similar experience with my heart. At times i feel like i am getting a heart attack, it is beating so fast and hurts so much, i have chest pain too. The past days it has been constant. I also feel like it is the end often but i always survive and somehow they quiet down temporarily.
To prevent blod clots you need ginkgo daily.
Adult worms will not die from ivermectin. Only babies do. If we are talking about roundworms, adult ones, you need to take several meds at the same time for all the worm stages. Adults die last. I have only killed something big in my gut once but i had fever for 2 days and i could not move. If it is in your brain, dangerous. Adults move all the time so hopefully you will not catch them there. First you need to remove the small ones and eggs from your system, from blood, intestines, cysts from brain and try to stop the big ones from reproducing and from moving (hard one). Then you can move onto the big ones.
That is, given you have no other infections that could interfere with treatment. At the same time you need to detox like crazy otherwise the toxins knock you out and you can die or end up in ER again.