In order to count a trial as joy, we have to get to the place where we know that we know God loves us, that He is sovereign and that we can trust in His sovereign purpose. Then, although we may not feel good in the trial, we can still count it as joy because we know there is PURPOSE in it.
We look ahead beyond the trial to the promises of God. We know God works ALL things together for good according to His purpose (Romans 8:28). God uses every situation to conform us into the image of Christ (Romans 8:29) and the more like Christ we become, the more intimate relationship we experience with God. For me, I can count it all joy knowing that I am growing closer in relationship with Him. This is the greatest of all rewards.
It also helps to remember that Jesus promised to be with us and bring us through the trial. Knowing that the trial will come to an end and that Christ is in it with us gives us hope and hope results in faith and faith results in strength for the situation. Although we may “feel” alone in our trials, we can know that we are not. Christ promises He is always with us and will NEVER forsake us.
Understand and BELIEVE there is good purpose in your trial. KNOW the trial will come to an end. This is not all there is. REALIZE the reward for your suffering is better than any sacrifice you may experience. LEAN on Christ’s presence and be STRENGTHENED by it. Then you will be able to persevere and count it all joy when the trials of life suddenly come upon you.