The same event that caused Jesus so much grief and sorrow, is the same event that produces joy for the Christian.
When Christ was undeservingly beaten, tortured and nailed to a cross to die, much grief and sorrow was felt in those who loved Him. And yet in that same event, there is much JOY because of what it all produced: Salvation for mankind; eternal security with God for those who love trust in Jesus Christ.
When a mother is delivering her baby there is much grief and pain involved, but with birth comes JOY of what it all produced, a little baby to love. God gives us great illustrations to see that sometimes life hands us (or we bring it up on ourselves) events that are sorrowful and that deeply grieve us. But God also uses those same events to produce JOY in us as we see our events through spiritual eyes.
Joy is not to be confused with happiness. Happiness is external; joy is within and untouched by external circumstances. Joy comes from God. No matter what difficult event I walk through, I still have the JOY of the Lord because I have the Lord who walks with me through those difficult events.
I will come through a little more mature in my faith, more wise, more sanctified, and closer to my Lord, not because of anything I did, but because of everything HE does in me - through the grief and sorrow of events. If the event that caused me so much grief caused me to fall before the beautiful feet of Jesus Christ - it was worth all the suffering, and therein lies my true eternal JOY.