Praise be to Allah.
There is no one in this worldly life who is safe from its calamities, whether they affect him himself, his family, his loved ones, his property and so on.
What is required of the believer is to be patient if any of that befalls him, and if he is able to attain the level of contentment and acceptance of the divine decree, then that is better, greater and will bring the greatest reward. We have previously discussed the difference between patience and contentment in the answer to question no. 219462 .
What you are feeling sometimes is not contrary to patience, so long as it does not go beyond being mere feelings in the heart, and is not manifested in the form of words or actions that are contrary to Islamic teachings, such as wailing, rending one’s garment and so on. This feeling (intense grief) comes to a person without him wanting it to, especially if it results from the loss of someone who was very dear to him, as in your case.
But what is required of the Muslim is not to respond to that grief and let himself get carried away with it, so that it will not have any impact on his life and his worship. So do not spend a lot of time on your own, and do not think about this distress and grief. Keep yourself constantly busy with useful things, and do not be a prisoner to this grief that is provoked by the Shaytaan to keep the Muslim distracted with grief and make him depressed, for the Shaytaan rejoices if he is able to cause grief to the Muslim. Allah, may He be exalted, says (interpretation of the meaning): “Private conversation is only from Satan that he may grieve those who have believed, but he will not harm them at all except by permission of Allah. And upon Allah let the believers rely” [al-Mujaadilah 58:10].
You can attain the level of contentment, by constantly thinking that this is something that Allah decreed and is something that was inevitable, so grief can never alleviate this calamity; rather it only makes it worse.
Always think of the reward for contentment with Allah, for the one who is content with the divine decree will attain the pleasure of Allah, and there is nothing greater than Allah being pleased with His slave.
The supplication that you offer for your father is a good supplication, and we ask Allah, may He be exalted, to answer it and to compensate you with good for what has befallen you.
And Allah knows best.