Hello, I am Dr. Aditya Gudhate and try my best to answer your question.
As you said many things can cause palpitations ranging from cancer to simple anxiety. But our priority should be to exclude those diseases which can prove to be life threatening. So while I think, like you, that anxiety is causing your symptoms, you should still visit a physician and do an ECG and test
thyroid function. Surely your anxiety will mellow when you find out you have a perfectly working heart! :)
I hope you are satisfied with my answer. Get well soon!