In verses 2-5 David talks to those around him that are unrepentant and speaks clearly to them about the joy of being a child of God in the midst of adversity. He explains that God has set his people apart, which changes the way God’s people look at trials. God’s people get to look at their trials as coming to them through the hands of their loving Father for a specific purpose (Romans 8).
“Election is a doctrine which unredeemed men cannot endure, but nevertheless, it is a glorious and well-attested truth, and one which should comfort the tempted believer. He who chose us for himself will surely hear our prayers. The Lord’s elect shall not be condemned, nor shall their cry be unheard.” -CHS
Hope in the Psalms
Find Christ-centered hope in the fact that if you are a child of God, then the trials and troubles you endure come to you for a specific purpose and your Father hears your prayers.