King David’s Eulogy for Shaul and Yehonatan

Why does King David eulogize King Shaul, especially after King Shaul attempted to assassinate King David on multiple occasions? What was the true genuine relationship between King David and Yehonatan? And what lessons can we learn from this eulogy in our lives?