For the Lord will not
cast off forever,
but, though he cause grief, he will have compassion
according to the abundance of his steadfast love;
for he does not afflict from his heart
or grieve the children of men.
~ Lamentations 3:31-33
God doesn't want to make us hurt but He does use the hurts to shape us into the people He wants us to become. He has amazing plans for us. Just because what's happening right now doesn't have a happy ending doesn't mean that a happy ending won't come.