"No doubt Pain as God's megaphone is a terrible instrument: it may lead to final and unrepented rebellion. But it gives the only opportunity the bad man can have for amendment. It removes the veil; it plants the flag of truth within the fortress of a rebel soul." C.S. Lewis, The Problem of Pain
None of us likes pain. Pain is never something to look forward to. Unfortunately, pain is at times a "necessary evil" because of the rebelliousness of our hearts. Sometimes the only way that God can break through the barrier that we have placed around our hearts is with a sledgehammer. In that sense, the pain that God allows (causes?) in our lives is a matter of grace. In that sense, pain is not a necessary evil, but a necessary good.
Please do not misunderstand. I am not saying that pain is good. We shirk from pain, and rightfully so. Yet, we should never deny that God always uses pain for our benefit and His glory. Although that does not necessarily take the pain away, it can make it easier to bear. We are able to endure when we take our eyes off of our current pain and focus on the promise that, "all things work together for the good."
This is beautifully summarized in Hebrews 12:11:
"All discipline for the moment seems not to be joyful, but sorrowful; yet to those who have been trained by it, afterwards it yields the peaceful fruit of righteousness."
Some reading this are in immense pain right now, be it physical or emotional. I do not mean to make light of your pain. But rest assured that He is in the process of planting the flag of truth in your heart, and the yield will be the "peaceful fruit of righteousness"...as long as you let Him work. As C.S. Lewis points out, we have two choices when faced with pain: (a) unrepentant rebellion, or (b) allowing the veil to be removed.
Child of God, take courage and trust Him with your pain! Allow Him to work. It will produce great fruit.