Allah has promised to inflict trials on all of us, testing us in one way or the other. And we only need to turn to Him each time asking for His mercy and guidance to lead us righteously out of the trials and tribulations, rather than to lose hope and commit one of the greatest sins by ending our lives.
In one of the Surahs, Allah has said, “And [mention] Job, when he called to his Lord, “Indeed, adversity has touched me, and you are the Most Merciful of the merciful.” So We responded to him and removed what afflicted him of adversity. And We gave him [back] his family and the like thereof with them as mercy from Us and a reminder for the worshippers [of Allah ].
Surat Al-Anbya 21:83-84
And spend in the way of Allah and do not throw [yourselves] with your [own] hands into destruction [by refraining]. And do good; indeed, Allah loves the doers of good.
Surat Al-Baqarah 2:195
O you who have believed, do not consume one another’s wealth unjustly but only [in lawful] business by mutual consent. And do not kill yourselves [or one another]. Indeed, Allah is to you ever Merciful.
Surat An-Nisa 4:29