I could try to come up with an antonym to my own interpretation of Don't count your chickens before they hatch.
But you have provided your own interpretation:
don't assume the optimistic scenario will happen before it does
Or, don't gamble everything on something working out the way you hope it will. (Don't get ahead of yourself.)
For an antonym, what you're looking for, again in your own words, is an idiom that means:
don't assume the worst until it actually occurs
I take this to mean that, everything being equal, you should not be defeatist about possible outcomes. Or that you shouldn't let the possibility of a poor result stop you.
In that spirit, what come to mind are the following:
Nothing ventured, nothing gained.
—used to say that it is worth trying to do something because one might succeed even though success is not certain
Never say die.
—used to encourage someone to continue something or to remain hopeful
// It doesn't look good for the team, but never say die. They could pull off a miracle.