The Jataka, Vol. IV, tr. by W.H.D. Rouse, , at sacred-texts.com
"Why in the woodland," etc. This story the Master told while sojourning in Jetavana, about a landowner whose son had died. At Sāvatthi, we learn that death took a beloved son of a certain landowner who used to wait upon the Buddha. Afflicted with grief for his son, the man washed not and ate not, and neither went about his own business nor waited upon the Buddha, only cried, "O my beloved son, thou hast left me, and gone before!"
As in the morning time the Master was looking abroad upon the world, he perceived that this man was ripe for attaining the Fruit of the First Path. So next day, having led his followers through the city of Sāvatthi in search of alms, after his meal was done, he sent the Brethren away, and attended by Elder Ānanda walked to the place where this man lived. They told the landowner that the Master had come. Then they of his household prepared a seat, and
made the Master sit down upon it, and led the landowner into the Master's presence. Him after greeting, as he sat on one side, the Master addressed in a voice tender with compassion: "Do you mourn, lay Brother, for an only son?" He answered, "Yes, Sir." Said the Master, "Long, long ago, lay Brother, wise men who went about afflicted with grief for a son's death, listened to the words of the wise, and clearly discerning that nothing could bring back the lost, yet felt no grief, no not even a little." So saying, at his request the Master told a story of the past.
Once upon a time, when Brahmadatta was reigning in Benares, the son of a very wealthy brahmin, at the age of fifteen or sixteen years, was smitten by a disease, and dying came to being again in the world of the gods. From the time of his son's death, the brahmin would go to the cemetery, and make his moan, walking around the heap of ashes; and leaving undone all his duties, he walked about smitten with woe. A son of the gods, as he went about, saw the father, and devised a plan for consoling his misery. He went to the cemetery at the time of his mourning, taking upon himself the semblance of the man's very son, and adorned with all sorts of ornaments, he stood on one side, holding his head in both hands,  and lamenting with a loud voice. The brahmin heard the sound, and looked, and full of the love which he bore his son, stopt before him, saying, "My son, dear lad, why do you stand mourning in the midst of this cemetery?" Which question he put in the words of the following stanza:
Begarlanded, with earrings in each ear,
Fragrant of sandal, holding out thy hands?
What sorrow makes thee drop the falling tear?"
And then the youth told his tale by repeating the second stanza:
My chariot is, wherein I use to lie:
For this a pair of wheels I cannot find;
Therefore I grieve so sore that I must die!"
The brahmin listened, and repeated the third stanza:
Brazen or silvern, that thou hast in mind,
Speak but the word, a chariot shall be made,
And I thereto a pair of wheels will find!"
Now the Master himself, in his perfect wisdom, having heard the stanza repeated by the young man, repeated the first line of another—
while the young man repeats the remainder:
By such a pair of wheels as yonder twain
My golden car new radiance hath won!"
[paragraph continues] And immediately after:
To pray for that which should be craved by none;
Methinks, young sir, thou needs must perish soon,
For thou wilt never get or moon or sun!"
None sees a ghost: then which is now more foolish in his wailing?"
So said the youth; and the brahmin, comprehending, repeated a stanza:
I am the greater fool—thou sayest truth,
In craving for a spirit from the dead,
Like a child crying for the moon, in sooth!"
Then the brahmin, consoled by the youth's words, rendered thanks to him by reciting the remaining stanzas:
 "Grief for my son—a cruel shaft was lodged within my heart; "That dart extracted, free from pain, tranquil and calm I keep;
Thou didst bring water, and didst quench the pain of my desire.
Thou hast consoled me for my grief, and taken out the dart.
Hearing, O youth, thy words of truth no more I grieve, nor weep 1."
 "Grief for my son—a cruel shaft was lodged within my heart;
"That dart extracted, free from pain, tranquil and calm I keep;
Then said the youth, "I am that son, brahmin, for whom you weep; I have been born in the world of gods. Henceforward grieve not for me, but give alms and observe virtue, and keep the holy fast-day." With this admonition, he departed to his own place. And the brahmin abode by his advice; and after much almsgiving and other good deeds, he died, and was born in the world of gods.
The Master, having ended this discourse, declared the Truths and identified the Birth: (now at the conclusion of the Truths, the landowner was established in the fruit of the First Path:) "At that time, I was myself the son of the gods who uttered this admonition."
37:1 The story is given in Dhammapada, p. 93, where the name is Maddhakuṇḍalī.
39:1 These stanzas recur in iii. 157 (trans. p. 104), 215 (p. 141), 390 (p. 236), Dhammapada, p. 96.