Context: I Samuel 26:1.
Once again David finds himself, according to the prescript, in a setting where people are telling Saul where he can be found in order to capture or kill him. It does not make him happy and the psalm reflects the fact that he is disgruntled over this recent event. His psalm, his prayer, is one of deliverance. He asks God to save him from his current predicament. He puts his enemies in a light where they are basically pagans looking not just to get after him, but disrespecting God at the same time. Not a bad strategy.
I sense a bit of reverse psychology when David states triumphantly that God has (I think we can probably read this as will) upheld his life and helped him and will repay those who seek him with nothing less than death. If this were to happen then God would be showing his faithfulness to David.
God, if you heal my mother then I will offer up my child to you. This was a prayer that a frantic son prayed as his mother was dying from the complications of a stroke. His mother died and now he was terrified that God was going to repay him for his prayer. Pastor, will God be angry with me and will he curse my son? I know I was in Southern Italy, but this could have happened anywhere. Sometimes we simply make deals with God. At no time is this a good idea. God doesn’t need our deals. God just wants our devotion and our time and our love and our very life. He has given us everything, we don’t need to make a deal with God. Come on David, God doesn’t have to kill your enemies in order to prove His steadfast love.