Your stack shouldn't ever get to half a buy in, you should do your best to keep it at 100bb, set the auto-rebuy option to keep you at 100bb if you're playing online. The deeper the stacks, the more edge you have (the game becomes more complex and there is more room for error, and you're presumably making fewer errors than your opponents) and the rake is a smaller factor since it's smaller relative to the stacks.
Leaving because you now have 200bb in front of you makes some sense if you're bad at deep stack play, but still, you should basically always be better at it than your opponents. The only reasons I can see for leaving because your stack is too deep is if you go on "positive tilt" (i.e. playing stupidly because you think you're better than you are), or if it's too big relative to your bankroll.
I think overall you need to not be as attached as it sounds like you are to your individual buy ins, you can be absolutely crushing a game and lose a dozen buy ins to variance alone, variance is huge. You should also understand that ending sessions up doesn't count for much, it's the net result over all of the sessions you ever play that matters. Cashing out at a certain point to book a win doesn't alter your end results.
Also, be careful with some of the pro advice out there. A lot of it is... questionable. I have no doubt that Negreanu and Chan could both talk circles around anyone here, but a lot of the information that they actually make available is almost comical, whether that's intentional or just that the reliability gets lost in translation from pro to the masses, I don't know.