David was frequently engaged with enemies who would see him fall. When we try to do the right thing, we may experience this. Or we may just experience it because it is the way the world is. David said "my foes will rejoice when I fall".
But he trusted, rejoiced and even sang because of God's love, salvation and goodness.
And so must we.