Thank you for your question. I think this is a really important question, especially for Christians. The church is a body and St Paul reminds us that ‘if one part [of the body] suffers, all suffer with it’. We are also told to rejoice with those who rejoice and mourn with those who mourn. For many, their suffering is made worse by the sense of isolation they feel, whereas part of the way i think God intends to bring comfort is through the ‘hands and feet’ of others around us. But this is not easy. For this to work, several things are needed. Firstly, there needs to be a permission given by the church to be real and authentic. Church at its best should be a place where we can take off the mask. This makes it easier to ask for help when we are struggling. Secondly, there is always room for growth in how we respond to a person in pain. The opening chapters of Job highlight how hard this is. Learning to grow in listening well, appreciating that sometimes someones pain is so profound that words cannot capture it, and recognising that sometimes silence is better, are all important. Jobs friends comforted most effectively when they were silent and simply sat with Job and no doubt silently prayed. Learning to listen well, not trying to assert the reason for the suffering (prematurely or at all!), and allowing room for mystery and profundity are areas we can all grow in. Thirdly, the sufferer, should be willing to open up to others. Whether this is with one or two people, or a small or large group setting will differ depending on the person. But the main thing is not to suffer in silence. In a healthy setting where all of these dimensions are at work, Christian community can truly help someone walk through the valley they are in, in ways that would not have been possible without it. And, as you say in your question, watching someone go through suffering impacts the spiritual life of the church family. It can serve as an encouragement, because ‘if they went through this and are still standing at the end, then perhaps i can too’.
I hope this is in some way helpful,