Lately I've been listening to a CD set of Imam Anwar al-Awlaki's Lives of the Prophets, which I recommend for anyone who has the chance. To really maximize the experience, I suggest you read the section of Stories of the Prophets by Ibn Kathir (which is available in English) before listening to the story as told by the imam. That's because when you can listen to the imam you get not just the story of that particular prophet, but usually several lessons which might be learned from his story as presented in the Qur'an (and sometimes in the sunnah also.) Familiarity with the story beforehand will make it easier for you to focus on understanding the lessons.
This morning I finished Vol.1 (or rather, I came to the end, as I did not start at the beginning so can't really say I "finished") which describes the story of the Prophet Yunus, as, called Jonah in English. Jonah is the prophet who stopped making da'wah to his people out of frustration, and left them, so Allah punished him by having him be swallowed by a fish.
And [mention] the man of the fish, when he went off in anger and thought that We would not decree [anything] upon him. And he called out within the darknesses, "There is no deity except You; exalted are You. Indeed, I have been of the wrongdoers." 21:87From the darkness of the belly of the fish, in the darkness of the sea, in the darkness of the night, Jonah called out to His Lord with this du'a. And Allah tells us in the Qur'an (37:144) that Jonah would have remained in the belly of the fish until the Day of Resurrection had he not been of those who glorified Allah.
So when we make mistakes, we should first turn back to Allah, and put things back in focus--that Allah is the only ilah, the only one to worship (we say this in salaah daily: Iyyaka na'budu, and laa ilaaha illAllaah), and that our lives should be worship of Him, glorifying Him. (We also glorify Him in salaah: subhana rabbiyal-'adheem, subhaana rabbiyal-a'la) So we need to admit when we are wrong, and understand how and why we were wrong.
And also, understanding our mistakes is a way to avoid them later on. That's why it's interesting to point out that after Jonah turned back to Allah, Allah granted him success in his da'wah--his people believed, and so Allah did not punish them. (10:98)