Megillat Eichah was written so that the galut would not become a habit. One view is that Yehoyakim burned the first scroll, and Yirmeyahu wrote it again. Another view is that it was written after the churban. Chazal enacted that it be read every year on Tisha B'Av, so that we not fall into despair, and so that faith in Mashiach be rooted in the heart.