Śrīmad-Bhāgavatam · Text 7.5.37
Who is speaking and story frame
परोऽप्यपत्यं हितकृद्यथौषधं
स्वदेहजोऽप्यामयवत्सुतोऽहित: ।
छिन्द्यात्तदङ्गं यदुतात्मनोऽहितं
शेषं सुखं जीवति यद्विवर्जनात् ॥ ३७ ॥
paro ’py apatyaṁ hita-kṛd yathauṣadhaṁ
sva-dehajo ’py āmayavat suto ’hitaḥ
chindyāt tad aṅgaṁ yad utātmano ’hitaṁ
śeṣaṁ sukhaṁ jīvati yad-vivarjanāt
Although a medicinal herb, being born in the forest, does not belong to the same category as a man, if beneficial it is kept very carefully. Similarly, if someone outside one’s family is favorable, he should be given protection like a son. On the other hand, if a limb of one’s body is poisoned by disease, it must be amputated so that the rest of the body may live happily. Similarly, even one’s own son, if unfavorable, must be rejected, although born of one’s own body.
Read Śrīla Prabhupāda's purport on Vedabase.io