That line of thinking would have me reflect, "This is stress; and this is the origin of stress; etc."
I think that is an essential benchmark (i.e. a metric or dimension against which to measure experience, and lines of thought).
A lot of that dialog seems to me based on risky assumptions: especially "I", "getting", "expect", and "success/failure".
The assumption seems faulty, i.e. that the "I" can reliably acquire because of who it is; or that attainment is about getting.
I think that the "I" itself -- i.e. notions about the "I" -- is some kind of fetter.
Perhaps that's why you can read about "confidence in the Dhamma" but not about "self-confidence".
I could quote suttas but perhaps you know them.
At one level, there is cause and effect -- but I think it's misleading to associate that with "I".
I remember that a preschool teacher is taught that she may observe, distinguish, and teach the difference between what she'd call "good and bad behaviour" -- but it's the behaviour that's good or bad, not the person, and she shouldn't teach, "You are a bad boy."
It's maybe more helpful to see things -- actions, intentions, thoughts, conditions -- without the view of their being specifically embodied in this or that person. And maybe it's help to see people (including yourself) as impermanent, inconstant. I mean the line of reasoning you're complaining about is, "Because I was unsuccessful in the past I will be unsuccessful in the future", is that meant to imply you've never ever learned to do anything, never adapted to changing circumstance, never learned a new skill?
But one of the "new skills" of Buddhism is perhaps to recognise stress when you observe it.
For only stress is what comes to be;
stress, what remains & falls away.
Nothing but stress comes to be.
Nothing ceases but stress.