...the joy that endures through sorrow is the foretaste of that future joy in God which we hope for in the future. When Jesus was “very sorrowful, even to death” in Gethsemane he was sustained by “the joy that was set before him” (Hebrews 12:2). This does not mean that he felt in the garden or on the cross all that he would feel in the resurrection. But it does mean that he hoped in it and that this hope was an experienced foretaste of that joy.
Therefore, we groan here, waiting for the redemption of our bodies and for the removal of all our sins (Romans 8:23). This groaning and grieving is godly if it is molded by our delight in hope of glory (Romans 5:2-3). The delight is muffled by the pain. But it is there in seed form. It will one day grow into a great vine that yields wine of undiluted delight.
So let us embrace whatever sorrow God appoints for us. Let us not be ashamed of tears. Let the promise that joy comes with the morning (Psalm 30:5) sustain and shape our grief with the power and goodness of God. - John Piper.
I encourage you to read the entire article here.