David is begging for mercy after he sinned egregiously with Bathsheba. (We know this is the theme because the Psalm itself tells us in the heading.)