The first few verses show that Jeremiah was feeling a bit conflicted. This is how we can sometimes feel, too, as we try to minister to others. My Study Bible points out that this is how Jesus probably felt in the Garden of Gethsemane as He looked out over Jerusalem, knowing His fate. Our command as Christians, however, is clear. We are to focus, and keep focusing on, bringing others to Christ. God will handle the rest.
Verses 23 and 24 are great reminders as to what we should and should not boast in.