I failed a test miserably about a month ago. Today, I got a similar test back and I passed this time round by the skin of my teeth. I should've scolded but I stopped myself. Instead, I internally sung myself a happy song and created tiny applause with my two index fingers that sounded like an overenthusiastic crowd on a sitcom in my mind.
Let the smallest of victories encourage you to win your bigger battles. A slight improvement is still an improvement.