There is always a silver lining through difficult times. Firstly, we should try to approach these difficulties through a growth mindset ie an opportunity for growth compared with setbacks. This is because these tests are given to us by Allah to raise us in status and the prophet peace be upon him told us even the smallest of harms would be a means for our sins to be forgiven. The condition would be is if we show patience, seeking the reward from Allah and submit to Allah.
The second would be resilience and adaptability (in relatively short time).
Thirdly the first and last solution to the problem is dua to Allah, because Allah wants us to make dua to him so that he can remove our problems and this what you will find repeatedly in the quran.
Fourthly you do not need to cover your feelings, seek out the people who love you and qualified and discuss your problems and solution to your issue. Be careful to avoid unqualified people because their advice can make the problem worse.
Failure is not a result but rather an opportunity for learning, to become better and know how to avoid for the future. Failure is your teacher.
How to navigate through challenging times:
The prophetic approach is moderation and better to be regular even if it small then large but inconsistent. Therefore, do not burden yourself with unrealistic expectations and then seek out advice from those who have been through your struggle before or those qualified to give advice.
Focus on gratitude and mindfulness, remember those that have less than you will help you to be grateful to Allah. Allah will increase you in that which you are seeking if you are grateful to him, this includes the problem you are in. Focusing on the present this is the prophetic way, prevents additional worry of the future and regret of the past.
Finally do something that distracts your mind during times of stress that you enjoy to do.
Finally, the promise of Allah is the bottom line and this is Allah will grant you ease, and this is the general condition with restricted times of difficulty.