It's extremely frustrating that this happens, sometimes it happens to everyone who loves betting. In my practice, the most frustrating thing is when I calculate all the results, analyze the situation and discuss it with the AI.
What is the use of analyzing with AI? It is game that depends on multiple factors, not a math problem that you are having difficult solve.
It is all dependent on factors that are not under your control. So wins and losses will come in equal numbers eventually making your net profit zero or towards the negative side.
We should curb the idea of a near-miss. A loss is a loss, nothing to make you feel good about it.