He is dying from cancer remember, and Gus asked him what he planned to do after his contractual obligations we're fulfilled, to which he then offered 15 million/yes to continue as he was doing. But Walt never expected to do that well with building his family a nest egg for after his death, hence his comment to Jesse about being grateful, and not think about the fact that Gus was cheating them out of money. I mean, with all things considered...Walt felt satisfied with where he would stand financially at the end of his contract with Gus, and, more importantly, where he would stand in regards to his nest egg.
Now, if you also remember, Walt never intended to "go out" in a hospital or care facility, slowly and painfully, which is why he didn't care much about how his life ended, except that it be in his own terms. That said...he did not need to continue into a new 15 million/yr contract while he slowly died, and he didn't want to have to explain any of his decisions to, well, anyone.
So, his thinking that episode was this... I've done very well for my family, I've accomplished more than I ever expected, I don't want to enter another long term contract that I won't live long enough to complete, so, today is as good a day as any, in fact, better than, that way I owe no one and no one owes me, and my family is financially secure. So it's time, farewell cruel world.