You can either motivate them to stay strong or ensure that you will have their backs no matter what. Words like hang in there and I am sorry for your loss can comfort people during a difficult time.