Try to catch your negative thoughts and question them.
For example, if you have a thought "X is not going to work" then you can ask yourself: "What is the evidence that X has absolutely no chance of working?" and "What is some evidence supporting that X will work?". Then you can go back to the original thought and see that this statement might be more realistic: "X has a chance to work if Y and Z happens"
And try not to label things in absolute ways, as either black or white, but more as a shade of grey. Things are not either a success or a disaster. There is a lot inbetween.
For example, if you have a thought "X is not going to work" then you can ask yourself: "What is the evidence that X has absolutely no chance of working?" and "What is some evidence supporting that X will work?". Then you can go back to the original thought and see that this statement might be more realistic: "X has a chance to work if Y and Z happens"
And try not to label things in absolute ways, as either black or white, but more as a shade of grey. Things are not either a success or a disaster. There is a lot inbetween.