The key is to never give up on your trust in Allah. No matter what situation comes, know that He knew it well beforehand. He has willed for you to go through it and so you are facing what you have to.
Indeed there will be khair in it, if you bear sabr & keep your tawakkul in Him.
Remember absolute trust is what a slave must have in his Maker, no matter what the situation is!