This is not a pastoral thought. But its still the best thing I have read on the purpose God has in allowing evil and suffering. If you are suffering at the moment you might not be best placed to receive this and think about it. Maybe come back to it at a later point.
Its from an essay by John Piper called "The Suffering of Christ and the Sovereignty of God" in a recent book of the same name, published by Crossway (the best short, accessible book on suffering I have read recently). Here is what Piper says about why suffering exists in the first place:
I believe the entire universe exists to display the greatness of the glory of the grace of God...Therefore, this is the ultimate aim and explanation of all things - including suffering.
[Christ] coming to suffer and die is the supreme manifestation of the greatness of the glory of the grace of God. Or, to say it a little differently, the death of Christ in supreme suffering is the highest, clearest, surest display of the glory of the grace of God.
Or to put it most simply and starkly: the ultimate reason that suffering exists in the universe is so that Christ might display the greatness of the glory of the grace of God by suffering in himself to overcome our suffering. The suffering of the infinitely holy Son of God in the place of utterly undeserving sinners to bring us to everlasting joy is the greatest display of the glory of God's grace that ever was, or ever could be.
Everything leading to [the cross] and everything flwoing away from it is explained by it, including all the suffering in the world.