The final perek of Yirmiya tells of the tragedies of the destruction of the Beis Hamikdash and our exile to Bavel. As the RiKara (52:12) points out, based on the pesukim and the Gemara, the main parts of the Beis Hamikdash were actually burned on the 10th Av. This explains the statement of Rav Yochanan that ‘I would have fixed the fast day on the tenth of Av.’ If so, why do we observe Tisha B’Av on the 9th ? For, as the Gemara concludes, ‘The beginning of the punishment is the main thing.’ What does this mean?
The idea seems to be that the destruction of the Beis Hamikdash was for our own good. As Chazal tell us, Hashem declared ‘Let the bricks of the Mikdash burn instead of Bnei Yisrael.’ Given that Hashem only wants good for us (that is the purpose of our creation), any punishment He gives us must also be constructive; a mechanism whereby we learn to correct our mistakes and grow to be better people. This is why we find that people can be rewarded for having received punishment; Shimshon famously asked for the reward for one of his eyes having been gouged out, even though this was a punishment for him having been swayed by the physical beauty of Delilah. He was asking for the reward of having grown from his punishment to become a better person.
We can apply this concept to the day of Tisha B’Av. As Rav Mendel Weinbach points out, not only do we observe Tisha B’Av on the 9th and not the 10th, but the laws of the fast get lighter as the day goes on (we sit on chairs, we wear tefillin, etc.). This is despite the fact that the Beis Hamikdash only started burning in the late afternoon of the 9th. We must realize that tragedy, exile, and destruction is ultimately for our own good and so we do not sit in excessive mourning at the time when the destruction actually happened. We fast and mourn on the 9th – for we must remember what we have lost – but we frame this with the realzation that Hashem does everything for our good. Perhaps this is why the final few pesukim of Yirmiya relate the seemingly insignificant facts of Yehoyachin’s release from prison and daily rations. Even at the end of Yirmiya, ‘The book of destruction,’ we convey the idea that there is always a ray of hope and reason to be positive, for all the destruction and suffering is ultimately for our benefit.
 Ta’anis 29a
 Derech Hashem