The Psalm of the Cross
Although there may have been an immediate reason for David to write this Psalm, it is ultimately Jesus' Psalm, not David's. We see His spiritual anguish as He is forsaken by God; a dreadful and actual separation due to our sins. God cannot bear to look on sin so had to abandon Christ. We see His mental torture through the mocking crowd of which we are a part; He died for our sins. We see His physical pain in details of crucifixion - which hadn't even been heard of in David's time - uncannily described. This was all in the plan of God. The sin debt is paid. The cry of passion becomes a cry of victory and accomplishment.