Difficulties and hardships from Allah (SWA).
In the name of Allah, the most Beneficent, the most Merciful.
Firstly, I would like to advise to be careful in using such words, which you used in the question with regards to Allah. Statements such as “I am angry with Allah…” can take a person out of the fold of Islam. Therefore, I advise you to repent sincerely for what you said and never utter those kinds of statements again.
When Allah (SWA) inflicts any hardships or calamity upon anyone, the purpose for this is to either test his true servants as Allah (SWA) in the Holy Quran has said,
“Be sure we shall test you with something of fear, and hunger and some loss of wealth and lives and fruits and glad tidings to those that bear patience”. (Suarh Baqarah v.156)
Sometimes it so happens for it to be a lesson for the people coming after not to commit that deed again as Allah (SWA) states in the Holy Quran:
“And indeed before you we sent (Messengers) too many nations so we seized them with suffering and adversity so that they may fall into humility.” (Surah Anaam v.42)
Or these tests can be a means of purification for the pious people. The Prophet of Allah Sallallahu Alahi Wasalam has said when a persons sins increases and nothing remains to remove it then Allah (SWA) inflicts this person with such sorrow which expiates his sins. (Tafsir Ibn Kathir)
Only Allah Knows Best
Mohammed Tosir Miah
Darul Ifta Birmingham