to the end he may establish your hearts blameless in holiness before our God and Father, at the coming of our Lord Jesus with all his saints.
In other words, "Don't be discouraged because I've had such a bad time, I've been afflicted; God's appointed me for that."