Praise be to Allaah.
The believer cannot do without his Lord. He is the only One Who can bring benefits or ward off harm. By turning to Allaah you did the right thing.
Death is a reality, and Allaah has decreed it for every soul, as He says (interpretation of the meaning):
“Everyone shall taste death”
[Aal ‘Imraan 3:185]
No matter how hard a person tries, he can never ward off that which Allaah has willed and decreed for him, namely death.
But fear should not prevent a person from worshipping and obeying Allaah, rather it should do the opposite. Fear should motivate one to worship and obey Allaah. Fear – as Ibn Qudaamah said – is the whip of Allaah with which He drives His slaves to persist in seeking knowledge and acting upon it, so that they may attain the status of being close to Allaah.
Fear may cause a person to become worried, anxious or ill, which may in turn cause him to despair of the mercy of Allaah; in this case his fear is not something good, it is bad.
It should be noted that a lot of worry and psychological stress is caused by not being content (with the will and decree of Allaah). We may not get what we want, and even if we do get what we want that may not make us feel content as we had hoped; the idea that we had in our minds before getting it was better than the reality.
Even after getting what we want we may still suffer from anxiety and fear of losing that blessing. There is no remedy for this apart from accepting the decree of Allaah, thanking Him for His blessings and patiently bearing the difficulties and calamities that Allaah has decreed for us.
Your situation may require a doctor, but you should note that most people’s diseases are not physical, rather they are psychosomatic.
Dr al-Faarez says: It became clear that for four out of five patients their sickness had no physical basis at all, rather their sickness stemmed from fear, anxiety, resentment and selfishness, and a person’s inability to create harmony between himself and life.
Look at how Ya’qoob (peace be upon him) wept for his son Yoosuf (peace be upon him) and lost his sight. Look at how distress overwhelmed ‘Aa’ishah (may Allaah be pleased with her) when the people slandered her by telling lies about her, and she kept weeping so much that she said: “I though that grief would tear me apart.” Agreed upon.
Dr Hassaan Shamsi Pasha said:
In the event of anxiety, secretion of a substance called adrenaline increases in the blood, the blood pressure rises, the heart rate increases, and a person feels heart palpitations or may feel as if something is sinking to the bottom of his chest.
He may become paranoid and rush from one doctor to another, wondering what is wrong with his heart, when there is nothing wrong in his body but he still suffers pain in his stomach and has indigestion, or bloating in his abdomen, or frequent urination or headaches.
You have to have faith and fear Allaah; always recite dhikr and wirds that are prescribed in sharee’ah, because this is one of the greatest remedies that will get rid of the thoughts that are going around in your mind and the things that hearts grieve over.
Some of the du’aa’s narrated from the Prophet (peace and blessings of Allaah be upon him) that deal with such matters include the following:
1 – It was narrated from Anas (may Allaah be pleased with him) that the Prophet (peace and blessings of Allaah be upon him) used to say: “Allaahumma inni a’oodhu bika min al-hammi wa’l-hazani wa’l’ajzi wa’l-kasali wa’l-jubni wa’l-bukhli wa dala’ il-dayn wa ghalbat al-rijaal (O Allaah, I seek refuge with You from worry, grief, incapacity, laziness, cowardice, miserliness, from being heavily indebt and from being overcome by men).” Narrated by al-Bukhaari, 6008.
2 – It was narrated that ‘Abd-Allaah ibn Mas’ood said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “If a person who is afflicted by anxiety or sorrow says: ‘Allaahumma inni ‘abduka wa ibnu ‘abdika wa ibn ammatika naasiyati bi yadika maadin fiyya hukmuka ‘adlun fiyya qadaa’uka as’aluka bi kulli ismin huwa laka sammayta bihi nafsaka aw ‘allamtahu ahadan min khalqika aw anzaltahu fi kitaabika aw asta’tharta bihi fi ‘ilm il-ghaybi ‘indaka an taj’al al-Qur’aana rabee’a qalbi wa nooar sadri wa jalaa’a huzni wa dhahaaba hammi (O Allaah, I am Your slave, son of Your slave, son of Your female slave, my forelock is in Your hand, Your command over me is forever executed and Your decree over me is just. I ask You by every name belonging to You with which You have named Yourself, or, or You have taught to any of Your creation, or You have revealed in Your Book, or You have preserved in the knowledge of the Unseen with You, that You make the Qur’aan the life of my heart and the light of my breast, and a departure for my sorrow and a release for my anxiety)’, then Allaah will take away his anxiety and sorrow, and will replace it with joy.”
It was said: “O Messenger of Allaah, should we not learn it?” He said: “Yes, whoever hears it should learn it.”
Narrated by Ahmad, 3704; classed as saheeh by Shaykh al-Albaani in al-Silsilah al-Saheehah, 199.
3 – It was narrated that Sa’d ibn Abi Waqqaas said: The Messenger of Allaah (S) said: “The prayer of Dhu’l-Noon which he said when he was in the belly of the fish: ‘Laa ilaaha illa Anta, subhaanaka inni kuntu min al-zaalimeen (none has the right to be worshipped but You (O Allaah), Glorified (and Exalted) be You [above all that (evil) they associate with You]! Truly, I have been of the wrongdoers’ [cf al-Anbiya’ 21:87]. No Muslim man calls upon Allaah with these words concerning any matter but Allaah will answer him.”
Narrated by al-Tirmidhi, 3505; classed as saheeh by al_Albaani in Saheeh al-Jaami’, 3383.
See also questions no. 21677 .
And Allaah knows best.