Reagan’s turnaround in ‘80 is a good example of how losing and winning the right races can result in getting the nomination. Kerry in ‘04 is another.
Losing never helps. Sorry.