There are two things which the progeny of Adam (as) have resentment towards but in reality there is hidden benefit within both

Death is disliked by mankind but in reality it is better than experiencing fitnah

Poverty is disliked by man but poverty will allow a person to experience a quick questioning/answering (hisab) in the hereafter.

The reality of both of these situations is that all humans try to avoid any experience with either of the two mentioned above,but for us Muslims,we believe that once a person passes away than the possibility of further sinning is eliminated.This will assist us in the hereafter when we will be brought before Allah (swt) with a lesser load of sins.And regarding the fact that poverty is better for man is because with less wealth to answer and account for in the hereafter a person will be allowed to pass thru that stage in the hereafter quicker than wealthier individuals.