Whatever doesn’t kill you only makes you stronger. You might have heard that before, but did you know it's a view often attributed to the German philosopher Friedrich Nietzsche (1844-1900)?
Nietzsche believed that the world is full of suffering and that it lacks any overall purpose or meaning.
However, he thought that our ability to deal with this suffering, to endure hardships and overcome them, is an important and valuable exercise of our power and character. In fact, in summoning the strength to overcome the darkness of the world, we find a way to overcome its meaninglessness, according to Nietzsche. He calls this Dionysian pessimism, after the Greek god of wine, music and partying, Dionysus. So it sounds like you could be a Dionysian pessimist!
But some philosophers have drawn on similar ideas to defend theism. They have argued that God put suffering in the world in order to allow us to learn something valuable from it.