"Count it all joy when you suffer" is not grief counseling, nor is it evidence of a punitive God. James is calling Jesus-followers to a perspective of divine wisdom that sees how suffering breaks us of our self-reliance and self-righteousness. And THAT is the Gospel that brings about redemption and resurrection life.