I've previously asked a question on this forum about leaving grad school and moving to a new field. I'm a chemistry PhD student in my (now) second year. I've decided to leave my PhD program because my heart is not in my work, nor am I very passionate about my field (word to the wise - don't go to graduate school because you don't know what else to do). The toll of grad school has resulted in some serious damage to my mental health to the tune of depression and anxiety.
I don't have a fantastic relationship with my advisor, but it's not terrible either. There's a significant language and cultural barrier that creates a sort of disconnect between us. As far as I know, my advisor does not know that I plan on leaving, although if my lack of motivation and focus hasn't tipped him off that there's something wrong, I don't know what will. The emotional and physical toll of lying and not telling my advisor the truth is becoming debilitating. I can't focus on work, I spend most of my time feeling hopeless and scheming on how to get away as quickly as possible and I suffer from constant headaches. I never was so apathetic until about 3 months into grad school.
My main concern is that I still have two classes I need to complete in the upcoming Fall semester in order to leave with my terminal master's degree, and I'm worried that if I tell my professor now he will become extremely angry, cut my funding (even thought I'll be teaching in the fall) and make me leave the lab. I do not want to leave without having something to show for my work here. However, I think I would feel better if I just told him now and put myself out of my misery. That way he would understand where I'm coming from and why I'm acting in this way. He's paying me for the summer and the guilt I have for wanting to leave is getting out of hand.
I'm also in sort of an awkward situation where the project I'm assisting in will eventually be mine when my co-worker graduates in May and there would not be another student to take over when I leave as well. I feel like I'm just leaving my advisor out to dry.
So my primary question is, when is the best time to tell an advisor about leaving? As soon as possible? Or continue to let it sit until the fall semester starts? Is there even a "good" time to do this?