The Buddhist tradition arose before the Socratic/stoic tradition and, since Greeks were very interested in Buddhism, it is likely the Socratic/stoic tradition was influenced by the Buddhist tradition. In other words, what is written in the question is essentially Buddhism. The following links are merely a small sample of similar Buddhist teachings:
Kisa Gotami was the wife of a wealthy man of Savatthi. Her story is one of the more famous ones in Buddhism. After losing her only child,
Kisa Gotami became desperate and asked if anyone can help her. Her
sorrow was so great that many thought she had already lost her mind.
An old man told her to meet Buddha. Buddha told her that before he
could bring the child back to life, she should find white mustard
seeds from a family where no one had died. She desperately went from
house to house, but to her disappointment, she could not find a house
that had not suffered the death of a family member. Finally the
realization struck her that there is no house free from mortality. She
returned to the Buddha, who comforted her and preached to her the
truth. She was awakened and entered the first stage of Arhatship.
Eventually, she became an Arhat.
Kisa Gotami
210. Seek no intimacy with the beloved and also not with the unloved, for not to see the beloved and to see the unloved, both are painful.
211. Therefore hold nothing dear, for separation from the dear is painful. There are no bonds for those who have nothing beloved or
unloved.
Piyavagga
Now at that time a certain householder's dear & beloved little son, his only child, had died. Because of his death, the father had no
desire to work or to eat. He kept going to the cemetery and crying
out, "Where have you gone, my only little child? Where have you gone,
my only little child?"
Then he went to the Blessed One and, on arrival, having bowed down to him, sat to one side. As he was sitting there the Blessed One said to
him, "Householder, your faculties are not those of one who is steady
in his own mind. There is an aberration in your faculties."
"Lord, how could there not be an aberration in my faculties? My dear &
beloved little son, my only child, has died. Because of his death, I
have no desire to work or to eat. I keep going to the cemetery and
crying out, 'Where have you gone, my only little child? Where have you
gone, my only little child?'
"That's the way it is, householder. That's the way it is — for sorrow, lamentation, pain, distress, & despair are born from one who
is dear, come springing from one who is dear."
Now at that time a large number of gamblers were playing dice not far from the Blessed One. So the householder went to them and they said:
"That's the way it is, householder [said the gamblers]. That's the way
it is. Happiness & joy are born from one who is dear, come springing
from one who is dear."
So the householder left, thinking, "I agree with the gamblers."
Piyajatika Sutta
Then Sakka, ruler of gods, and the divine King Vessavana had the venerable Maha Moggallana walk all over and explore the Vejayanta
Palace: "See, good sir Moggallana, this loveliness of the Vejayanta
Palace! See, good sir Moggallana, this loveliness Vejayanta Palace!"
Then the venerable Maha Moggallana considered thus: "This spirit is living much too negligently. What if I stirred up a sense of urgency
in him?"
Then the venerable Maha Moggallana performed such a feat of supernormal power that with the point of his toe he made the Vejayanta
Palace shake and quake and tremble.
When the venerable Maha Moggallana knew that Sakka, ruler of gods, was stirred to a sense of urgency with his hair standing on end, he
asked him: "Kosiya, how did the Blessed One state to you in brief
deliverance in the destruction of craving? It would be good if we
might also get to hear that statement."
Good sir Moggallana, I went to the Blessed One, and after paying homage to him, I stood at one side and said: ‘Venerable sir, how in
brief is a bhikkhu liberated in the destruction of craving, one who
has reached the ultimate end, the ultimate goal, one who is foremost
among gods and humans?’ When this was said, good sir Moggallana, the
Blessed One told me: ‘Here, ruler of gods, a bhikkhu has heard that
nothing is worth adhering/attaching to".
Cūḷataṇhāsaṅkhaya Sutta
(1) Bhikkhus, when an uninstructed worldling meets with gain, he does not reflect thus: ‘This gain that I have met is impermanent,
suffering, and subject to change.’ He does not understand it as it
really is. (2) When he meets with loss … (3) … fame … (4) … disrepute
… (5) … blame … (6) … praise … (7) … pleasure … (8) … pain, he does
not reflect thus: ‘This pain that I have met is impermanent,
suffering, and subject to change.’ He does not understand it as it
really is.
Gain obsesses his mind, and loss obsesses his mind. Fame obsesses his mind, and disrepute obsesses his mind. Blame obsesses his mind, and
praise obsesses his mind. Pleasure obsesses his mind, and pain
obsesses his mind. He is attracted to gain and repelled by loss. He is
attracted to fame and repelled by disrepute. He is attracted to praise
and repelled by blame. He is attracted to pleasure and repelled by
pain. Thus involved with attraction and repulsion, he is not freed
from birth, from old age and death, from sorrow, lamentation, pain,
dejection, and anguish; he is not freed from suffering, I say.
Lokavipatti Sutta
With contact as condition there arises a feeling felt as pleasant or painful or neither-painful-nor-pleasant. When one is touched by a
pleasant feeling, if one delights in it, welcomes it and remains
holding to it, then the underlying tendency to lust lies within one.
When one is touched by a painful feeling, if one sorrows, grieves and
laments, weeps beating one’s breast and becomes distraught, then the
underlying tendency to aversion lies within one. When one is touched
by a neither-painful-nor-pleasant feeling, if one does not understand
as it actually is the origination, the disappearance, the
gratification, the danger and the escape in regard to that feeling,
then the underlying tendency to ignorance lies within one. Bhikkhus,
that one shall here and now make an end of suffering without
abandoning the underlying tendency to lust for pleasant feeling,
without abolishing the underlying tendency to aversion towards painful
feeling, without extirpating the underlying tendency to ignorance in
regard to neither-painful-nor-pleasant feeling, without abandoning
ignorance and arousing true knowledge — this is impossible.
With contact as condition there arises a feeling felt as pleasant or painful or neither-painful-nor-pleasant. When one is touched by a
pleasant feeling, if one does not delight in it, welcome it, and
remain holding to it, then the underlying tendency to lust does not
lie within one. When one is touched by a painful feeling, if one does
not sorrow, grieve and lament, does not weep beating one’s breast and
become distraught, then the underlying tendency to aversion does not
lie within one. When one is touched by a neither-painful-nor-pleasant
feeling, if one understands as it actually is the origination, the
disappearance, the gratification, the danger, and the escape in regard
to that feeling, then the underlying tendency to ignorance does not
lie within one. Bhikkhus, that one shall here and now make an end of
suffering by abandoning the underlying tendency to lust for pleasant
feeling, by abolishing the underlying tendency to aversion towards
painful feeling, by extirpating the underlying tendency to ignorance
in regard to neither-painful-nor-pleasant feeling, by abandoning
ignorance and arousing true knowledge — this is possible.
Chachakka Sutta