When people are in a lot of pain, the Divine Judge does not hold them accountable for what they may think or say. Considering the adversity they are suffering, they are given mercy for the thoughts which come into their minds and the words which come out of their mouths.
When you are with someone going through horrible pain, be lenient if they say something which feels hurtful to you. Don’t take it personally. You might feel wounded because you are receiving some of the anguish they are going through. But it is your compassion which is taking it in, and therefore you should be forgiving. You see, this is when your soul shows its purpose.