I think this is a super important question. I think 'when' this arose is hard to pin-point because I think it's been a long process to such a short answer as 'positivity'.
The society in which we live is superficial, spectacular, on so many levels. By and large there is no 'going under' as Nietzsche may have said. We have no 'deep ecology,' no 'deep individualism,' no 'deep sociality.' If we 'went under' into any and all these we may find ourselves really in the same place: a completely embodied Unique One inhabiting a multiplicitous eco-sphere enjoying the benefits of a much broader sociality (including conflict) with humans and non-humans alike. We may even find that the arbitrary boundaries between each disappear.
Material egotism, world-as-resource, and patriotism/nationalism aren't deep, even while acceptable by the masses and Power alike. It's all too neat and easy. Any change in this requires a much more broad set of expressions of living and modes of perception most are too fearful to explore and experiment with. The State, after all, isn't just a political institution, but a limited *state* of consciousness, affairs, experiences, permitted.
'Positive' thinking is even a smaller subset of this already limiting way of living. For one, it focuses the blame of shit-gone-wrong too much on a Unique One. This is a vestige of our Christian heritage; the sinner, the one given to temptations, not following the narrow way, etc. This also does nothing to critique, to harm, and to ultimately dismantle the institutions, habits, and customs which many of us submit to. Thinking 'positively' holds each and every one of us responsible for that which precedes each of us and is larger than each of us. This is in so many ways reflective of the knee-jerk reaction most people have of critiques of society/civilization: 'What is your solution, then?" As if what we are are enveloped in, that within which we all are habituated, itself popped out of some unique one's head at some point in time!
Thinking 'positively' is a reaction of fear in my estimation, because it seeks the comfort of what presently is the case; it's safety in certainty, no matter how shitty that certainty may be, and allows for it to continue the latter's dominance. It is flight from uncertainty, from possibility, the unknown and even perhaps joyous acceptance of the unintelligible. Most people have far too much invested in the way life is lived now, the values cherished as 'truth,' and in their own limited set of permissible experiences, to ever trade a wagon-load of possibilities for their own meager handful of certainties.
'Positive thinking' is an expression of some vague 'hope,' itself simply a symptom of the exhaustion of a unique one at the end of their abilities to change their own lives and face all the demands of submission placed upon them. In itself, it constitutes a sort of self-blaming which in the end serves those who seek to master us all. To undermine all the internalized, as well as external, demands of submission, is what I might even venture to call 'spiritual' work (although I have some hesitation with that term).
Living is so much more than the dual (and stupid) paradigm of 'optimist/pessimist,' 'positive/negative' essentialist thought can ever express!
Note: This is totally off the cuff. Edited to add thoughts.