"Into your hands." Third, he breaks forth in sudden prayer; and concerning this he does two things. First, he commends himself to the Lord; second, he commemorates the divine benefit, either already received or soon to follow, at "You have redeemed," and so on. He says therefore as to the first, "Into your hands," and so on. What a man holds most dear he commends to his guide. And therefore in this perilous life I commend my spirit to you, God. Christ did this as an example for us; hence on the cross he said, "Into your hands," and so on. 2 Tim. 1: "I know whom I have believed," and so on. Thi...s is understood from the person of the Church; as if the Church were to say to its head, Christ: you say, "Into your hands I commend my spirit," and so on. And from this, namely from the cross, our redemption follows. He says moreover, "God of truth," because he fulfilled what he promised. But by comparison to adversaries he says, "You have hated"; as if to say, thus you relate to me, but how toward adversaries? Because you hate them, and rightly, because they observe vanities, and so on -- those, namely, who place and fix their hope in the things of the world. And this they do in vain, because these things fail. Wis. 5: "What has pride profited us?" and so on. Likewise vanities: auguries, or dreams, or pacts with demons; and such people are hated by God, because they are sacrilegious and idolaters. Ps. 39: "Blessed is the man whose trust is the name of the Lord," and so on.
"But I." Above, he assigned the reason for his hope from the divine condition; here he assigns it from the experience of divine benefits. Concerning which he does two things. First, he proposes hope; second, its effect, at "I will be glad." He says therefore: God hates the wicked; "But I," who do not observe vanities, "have hoped in God alone," not in the god of riches, 1 Tim. 6. The effect of hope is spiritual joy. Rom. 12: "Rejoicing in hope." And he sets forth the manner of joy, because "I will rejoice and be glad." Now exultation is a joy leaping forth outwardly through external signs. Gla...dness, however, denotes the interior expansion of the heart. Exultation therefore denotes the greatness of the joy; gladness, its moderation. And he places exultation first, because men inflamed with love of God at first rejoice more, and afterward moderately. "I will be glad," not in my justice, but in yours.
“Thou hatest them that hold to vanity uselessly” (ver. 6). Thou hatest them that hold to the false happiness of the world. “But I have trusted in the Lord.”
You hated them and rebuffed those paying constant attention to doing wrong; far from doing evil in the heat of passion, they involve themselves in the practice of evil as though an obligation (the sense of "paid constant attention"). By "futile things" he refers to the wrongdoing. By "in vain" he means that they got no benefit from their involvement in evildoing because of his hating and punishing them and not allowing them to bring to completion the object of their efforts.