James opens his letter urging us to do something that seems to carry a strange contradiction, "Consider it all joy, my brethren, when you encounter various trials" (Jas.1:2). Mortal people that we are, how can we be expected to rejoice when we are going through trouble? He says 'various trials' meaning that he has the whole wide spectrum in mind! What we would naturally feel are things like anger, anxiety, fear, doubt, despair, discouragement, etc. This is natural because we look at the natural things, 'the things that are seen', the things concerning different aspects of our life here on earth. We feel bad when things seem to be too difficult for us, unreasonable or out of our control, and the outcome seems to be uncertain. But what God says is that if we turn our eyes from this world to the eternal one, these feelings can be replaced by joy (vv.3,4). Overcoming in the midst of trials -- not giving in to temptations and enduring (surviving the attack against our faith) -- transforms our character into godliness.
If this understanding grips us and we can turn our mind towards what our trials can accomplish, then those trials lose their teeth. We are then able to look forward with expectation (1Co.2:9) rather than fear the future or look at it gloomily. Paul points to the 'eternal weight of glory' that can become ours when we face trials in the right way when we look at the things not seen and not at the things that are seen (2Co.4:17,18). When we do this, our old way of life gets given over to death while we receive the life of Jesus into our new nature (v.10).
It is clear that for this to happen, the life of Jesus must be really valuable in our eyes, more valuable than the comfort and pleasures of this life. Only then will we be able to see our trials as 'momentary and light' afflictions. We must have also learned to walk by faith and not by sight (by our senses).
It is natural that we pray for trials to be kept away from us and for relief when we face them. But the practical reality is that we cannot entirely keep them away. They will be there, as Jesus Himself has warned us (Jn.16:33). We must not be shocked when even 'fiery' testings come upon us (1Pe.4:12). God knows how much we can bear (1Co.10:13), but He also knows that unless our faith is tested through fire, its genuineness cannot be assured. Even if it appears to us that our trial is more than we can handle, we can overcome it when we receive grace to help us (He.4:16).
Finally, God tells us to comfort ourselves with knowing that one day all this will end, when we are taken up to be with Him (1Th.4:17,18). In other words, we are not to expect that trials will disappear before that! We must be mentally prepared knowing that they will come, and when they do come we can turn our attention to what God wants to do in us through them even as we pray for relief and the strength to go through with them. Here is a part of God's comfort that is hidden from natural eyes.