Both have same premise which is not giving our own body what it needs. In passive euthanasia, medicine and treatment. In suicide by starving it is food.
Allah says: And do not kill yourselves (nor kill one another). Surely, Allâh is Most Merciful to you (quran 4:29)
this indicates suicide is not allowed. Similarly, killing yourself by rejecting food is not allowed. you must feed yourself, and family members cannot starve their relatives. they are responsible for ensuring they get food and drink.
As for declining medicine or treatment - if is basic medication, the individual is required to take it. if it is treatment that is unlikely to be successful or has a low success rate like many cancer treatments, the patient can choose not to go through it and allow nature to take its course. they would not then be sinful.