I have learned the hard way time and again over the years. I didn't have confidence in my bet. Yet, I placed the bet anyway. Those two sentences have cost me more money in my career than anything else. If I could learn from my mistakes, hopefully I wouldn't do it again. Easy to say but hard to do. I break my own rules. And that is what gives me my loses. This is entirely avoidable.
The trouble with 'confidence' is awareness of yourself. You might think I'm being hard on myself here. The thing is, you need to be hard on yourself about your mistakes, so you don't repeat them. This is real money we're talking about, after all - it's your money.
I am not smarter than the horses running the race. None of us are. So for optimal results, I know that I need to wait for the "confidence" that I am right about my bet. The simplest, clearest way to do that is to be aware of your own confidence level and wait until you "feel" right about the bet. Otherwise, don't place the bet. That is the hardest thing in the world to do.
Learn from your losses when you have them. Be hard on yourself about your losses. Figure out why they happened so you can prevent them from happening again. Doing this will make you into the best bettor you can be.