What I do is pray the child will accept their suffering as the Will of God, but I offer my own suffering to God. I know that parents especially suffer along with their child as Our Lady suffered watching her own Son suffer so much.
I pray that my adult children (now) will not lose their faith, just because they are seriously sick, mishaps, crosses in their life that are hard to cope with.
You can also unite your own suffering to the suffering of Jesus, I found this to be very helpful in my own life. Depending on how old the child is, you can find a similar suffering in the life of the Holy Family, and tell them the story, encouraging them to unite their sorrow with the story you just told them.