It is narrated from Sayyiduna Ali (may Allah be pleased with him) that he said: "When Abu Talib died, I came to the Prophet (peace and blessings be upon him) and said that your elderly uncle has passed away. He (peace and blessings be upon him) said: 'Go and bury him, then do not do anything else until you come back to me.'" He said: Then I buried him and came to him (peace and blessings be upon him). He (peace and blessings be upon him) said: "Go and take a bath (ghusl), then do not do anything else until you come to me." Sayyiduna Ali (may Allah be pleased with him) said: "So I took a bath and then came to him (peace and blessings be upon him). Then he (peace and blessings be upon him) made such supplications for me that receiving red and black camels in exchange for them would not please me (as much as those supplications did)."
The narrator says that it was the practice of Sayyiduna Ali (may Allah be pleased with him) that whenever he washed a deceased person, he would also take a bath himself.