I have always been drawn to the rhetorical question posed in vs. 3: "When the foundations are being destroyed, what can the righteous do?"
David deftly describes an event where the upright are coming under attack by wicked forces. What can you do in a situation like this besides a) find refuge in the Lord and b) commit your cause to Him?
Verse 4 lets us look beyond the veil that separates earth and heaven. The good news is the revelation that the Lord is in His holy temple, and He is well aware of what is going on. It is in the justice of God that we must trust; He will resolve all matters according to His judgment.