How do i fast without risking my mental health?

i want to be less fat to make my parents happy and, for a variety of reasons, fasting seems like the option thats most likely to work. the problem is that if i go too long without eating, my mental and emotional stability go completely down the toilet.

is there a way to fast without risking another mental breakdown, or do i just have to deal?