He asks God to be merciful to him, for his soul takes refuge in God.
David takes refuge in God until these troubles are over.