David HaMelech assembled Sefer T’hilim (the Book of Psalms) in five books, corresponding to the Five Books of the Torah. We find that the whole Torah is included and hidden in T’hilim. When David HaMelech would suffer, he would look in the letters and words of that tzarah in the Torah and compose a chapter of T’hilim, which was revealed to him through the light of the Torah. And each chapter of T’hilim certainly corresponds to a chapter in the Torah” (Degel Machanei Ephraim: Chayei Sarah).