Praying while you feel like this
People stop praying rather than pray badly, and that is a heavy price for a thing nobody asked of them. The report below is the concession chain in the text. Whether a panic attack reaches the threshold it describes, and where exactly that threshold sits, is a fiqh question. Ask a scholar you trust, once, and take the answer.
Qur’an and Sunnah
لَا يُكَلِّفُ ٱللَّهُ نَفۡسًا إِلَّا وُسۡعَهَاۚ لَهَا مَا كَسَبَتۡ وَعَلَيۡهَا مَا ٱكۡتَسَبَتۡۗ رَبَّنَا لَا تُؤَاخِذۡنَآ إِن نَّسِينَآ أَوۡ أَخۡطَأۡنَاۚ رَبَّنَا وَلَا تَحۡمِلۡ عَلَيۡنَآ إِصۡرࣰ ا كَمَا حَمَلۡتَهُۥ عَلَى ٱلَّذِينَ مِن قَبۡلِنَاۚ رَبَّنَا وَلَا تُحَمِّلۡنَا مَا لَا طَاقَةَ لَنَا بِهِۦۖ وَٱعۡفُ عَنَّا وَٱغۡفِرۡ لَنَا وَٱرۡحَمۡنَآۚ أَنتَ مَوۡلَىٰنَا فَٱنصُرۡنَا عَلَى ٱلۡقَوۡمِ ٱلۡكَٰفِرِينَ
God does not burden any soul with more than it can bear: each gains whatever good it has done, and suffers its bad- ‘ Lord, do not take us to task if we forget or make mistakes. Lord, do not burden us as You burdened those before us. Lord, do not burden us with more than we have strength to bear. Pardon us, forgive us, and have mercy on us. You are our Protector, so help us against the disbelievers.’
Qur’an 2:286
Narrated `Imran bin Husain: I had piles, so I asked the Prophet (ﷺ) about the prayer. He said, "Pray while standing and if you can't, pray while sitting and if you cannot do even that, then pray Lying on your side
Sahih al-Bukhari 1117graded sound, sahihaynfull report
Translation: M.A.S. Abdel Haleem, The Qur'an, Oxford University Press, 2004.