Intention to do good deeds
Question

What should one's intention be while commiting a good deed? Should one commit a good deed for the sake of Allah and the Holy Prophet , should one commit his good deed for the sake of Allah and out of love of the Holy Prophet or his Sunnah, or should one commit a good deed for the sake of Allah alone?.
Praise be to Allah.When doing acts of worship, they should be done sincerely and purely for the sake of Allah alone, as Allah says (interpretation of the meaning): 
“And they were commanded not, but that they should worship Allah, and worship none but Him Alone (abstaining from ascribing partners to Him), and perform As‑Salah (Iqaamat‑as‑Salah) and give Zakah, and that is the right religion” [al-Bayyinah 98:5] 
“And who has (in mind) no favour from anyone to be paid back,
Except to seek the Countenance of his Lord, the Most High” [al-Layl 92:19-20]
And the Prophet (peace and blessings of Allah be upon him) said: “Allah does not accept any deed except that which is done only for Him and to seek His Countenance.”
Narrated by al-Nasaa’i, 3140; classed as saheeh by al-Albaani in al-Silsilah al-Saheehah, 52. 
Think about what Allah says (interpretation of the meaning): 
“Would that they were contented with what Allah and His Messenger gave them and had said: “Allah is Sufficient for us. Allah will give us of His Bounty, and so will His Messenger (from alms). We implore Allah (to enrich us)” [al-Tawbah 9:59]
Note how this verse ascribes the giving to Allah and His Messenger, and sufficiency to Allah alone. The verse does not say “Allah and His Messenger are sufficient for us”. And it describes the imploring as being to Allah alone, as He said, “We implore Allah”, and does not say “we implore Allah and His Messenger.” This is like the verse in which Allah says (interpretation of the meaning): 
“So when you have finished (your occupation), devote yourself for Allah’s worship.
And to your Lord (Alone) turn (all your) intentions and hopes” [al-Inshiraah 94:7-8]
See Zaad al-Ma’aad, 1/36 
So worship should be devoted to Allah alone; it is not permissible to do any act of worship with the intention of drawing closer to any created being. 
With regard to loving the Prophet (peace and blessings of Allah be upon him), that means following him and venerating him, not by worshipping him. 
Worship can only be acceptable to Allah if it meets two conditions: 
1 – It is done sincerely for Allah alone
2 – It follows the Sunnah of Prophet (peace and blessings of Allah be upon him) and is in accordance with his sharee’ah. 
These two conditions are indicated by the verse in which Allah says (interpretation of the meaning): 
“So whoever hopes for the Meeting with his Lord, let him work righteousness and associate none as a partner in the worship of his Lord” [al-Kahf 18:110]
Ibn Katheer (may Allah have mercy on him) said: “ ‘Let him work righteousness’ means, that which is in accordance with the laws of Allah. ‘And associate none as a partner in the worship of his Lord’ means, worship in which he seeks the Countenance of Allah alone, with no partner or associate.’ These are the basis of acceptable deeds: it must be sincerely for the sake of Allah alone, and correct according to the sharee’ah of the Messenger of Allah (peace and blessings of Allah be upon him).” 
So when you worship you must seek the Countenance of Allah alone, and strive to follow the Sunnah of the Prophet (peace and blessings of Allah be upon him). We ask Allah to help us to do righteous deeds. 
And Allah knows best.