Sayyiduna Jabir (may Allah be pleased with him) reports this as a marfu' hadith (traced back to the Prophet): He (peace and blessings be upon him) said: "Once a man passed by the skull of a human being. A thought occurred to his mind, so he fell into prostration. It was said to him: 'Raise your head! You are you, and I am I.'"
Al-Bazzar recorded it, and its narrators are thiqat (trustworthy).