As-Salaam alaykum,
Ayat 21 of Surat Ahzab of the Holy Qur'an (33:21) reads:--
"YOU HAVE INDEED IN THE APOSTLE OF ALLAH A BEAUTIFUL PATTERN (of conduct), FOR ANYONE WHOSE
HOPE IS IN ALLAH AND THE FINAL DAY, AND WHO ENGAGES MUCH IN THE PRAISE OF ALLAH."
Thus since our object is Allah, Subhanahu Wa Ta'ala, and the Last Day, we are charged to follow the Prophetic guidance shown by Prophet Muhammad, Sallallahu alaihi Wasallam... the guidance referred to as "a beautiful example.." that Allah loves. Spiritual teachers have always told us that the Prophet's beautiful example primarily lies in in the inner qualities of his soul... designated by his Compassion, Justice, Generosity, Forgiveness etc
We should imitate him in this, Sallallahu alaihi Wasallam, by obeying the rules of Islamic Shari'a and overcoming everyday forgetfulness of the Soul. This is closely related to the teaching in Ayat 31 of Surat Ali-Imran of the Holy Qur'an:--
"SAY: IF YOU LOVE ALLAH, FOLLOW ME, AND ALLAH WILL LOVE YOU AND FORGIVE YOU YOUR SINS". (3:31)
In otherwords, the way to become worthy of Allah's Love is to follow Prophet's guidance. The goal of following this guidance is explained by a famous Hadith Qudsi in which the Prophet, Sallallahu alaihi Wasallam, quotes the words of Allah Ta'ala:--
"WHEN MY SERVANT APPROACHES ME THROUGH GOOD WORKS, THEN I LOVE HIM. WHEN I LOVE HIM, I AM THE
HEARING WITH WHICH HE HEARS, THE EYE WITH WHICH HE SEES, THE HAND WITH WHICH HE GRASPS, AND THE
FOOT WITH WHICH HE WALKS." [Bukhari, Hadith No. 6502].