I spent this weekend upstate with my partner, huddled under a blanket on the porch. As we reminisced about where our lives had been the summer we first met and went upstate together, I realized how far I’ve come. Five years ago, I had just transitioned from being a women’s rights litigator into academia, and I was plagued with self-doubt about my ability to write my first law review article, much less get a job as a law professor. At the same time, my partner and I had just started dating, and I was consumed with anxiety about whether I was “good enough” to keep him around.

Back then I had a lot of theories about myself. They were basically all insecurity, but because I had been to a lot of therapy and read a lot of 19th century novels growing up, I had complicated narratives about myself that I used to smuggle my lack of self confidence around and disguise it from myself.

For instance, one of my theories about myself was that I was not “naturally” an academic. I was constantly telling people this as though it made sense. Even though if you break it down, academia is the opposite of any natural skill set. The whole point of being an academic is that it takes decades of education to train you into thinking and writing that way. But that logic did not deter me.

Another story I had at the time was that I was unlovable. I had this conviction that there was something “mysterious” about other women that I didn’t have. And this “mysterious” element was what made other women lovable, and not having it meant men wouldn’t fall in love with me. I was not deterred by the fact that several men had fallen in love with me already—I had my theory, and I was sticking to it.

These stories I had were essentially just window dressing for the fact that I didn’t think I was smart enough or compelling enough. Or, alternatively, often I thought that I was too much of something. Not enough of one thing, too much of something else—the rules were always shifting in my brain, but the outcome was the same: I felt insecure, and I lacked the self-confidence I wanted to feel.

Many of us know we are lacking self-confidence, so we try to fix it. First we try to fix it by accomplishing something external. If I just get the promotion, or the clerkship; if I just lose the weight; if I just get a boyfriend. Of course we’re making it much harder to achieve those things with our thoughts, but sometimes we’re able to white-knuckle it through and get there.

And then what do we find? We still feel exactly the same. External accomplishments don’t create confidence. They just can’t. External circumstances don’t create our feelings. Our thoughts create our feelings.

If you tell yourself you’re not smart enough and you don’t work hard enough, and then you get a promotion, it’s not going to change those thoughts. You’re just going to start believing you tricked everyone else, or it was luck, and you’re going to keep your insecure thoughts.

Another thing we like to try is asking other people for validation. Here’s what’s happening when you try to get external validation from other people: You’re basically asking them to offer you a thought you can think. And for a few minutes, you believe that thought, because someone else said it, and you feel better. But you haven’t changed your underlying thoughts about yourself, so it doesn’t stick. Insecurity is like Teflon—nothing anyone else does or says will stick to it, ultimately. It will all slide off.

The truth is we all have it exactly backwards. We think that accomplishments or validation create confidence. If I get that raise, I’ll feel good about myself. If that guy wants to sleep with me, I’ll feel good about myself. If my parents praise me, I’ll feel good about myself.

But it’s the opposite. You’ve got to believe in your ability to succeed before you can accomplish something mind-blowing. You must develop the confidence first. Confidence is the belief not just that you’ve already done some things, but that you have the capability of doing something in the future. Confidence is the belief that you already have what you need. Whether that’s being confident that you’re beautiful, confident you’re smart, confident you can climb Mt. Everest, or knit a quilt, or become a Senator. Whatever it is, confidence is the belief that you are already in possession of the qualities you need.

You may not have the knowledge yet, or the skills, or the experience, but you believe you have the capabilities to get there. That is what produces confidence, and that has to come from your thoughts. That’s why it doesn’t help much to think about accomplishments you don’t value. But it does help to think about challenges you overcame. It’s not about the external accomplishment or the achieving of the specific goal—it’s about believing in your own capabilities, drive, and determination.

Similarly, the day I felt lovable to other people was the day I truly loved myself. My confidence that I could find love didn’t come from tallying-up the men who had loved me in the past. It came from developing that love for myself. And once I had that, it seemed only natural that other people would love me, and that if I dedicated myself to finding a partner, I would be able to.

If you want to feel confident, there’s nothing wrong with starting by listing your accomplishments or by reviewing those who have loved you, but you’ll be doing even deeper work if you think about the things you’ve overcome in your life that were challenging or difficult.

What was hard? What was scary? What did you fear you could not do? Those accomplishments can be the bedrock of your self-confidence. Consistently practicing thinking about how you’ve overcome challenges in the past is what will build the confidence you need to take them on in the future.