And if it doesn't work out, you're perfectly fine with that as well. Your mental state is undamaged, and you're not signaling lack of value because you fall into desperation when "the only woman" (the one you worked so hard for!) you're with is leaving.
I would argue (probably strongly influenced by others, RSDTyler mainly [1]), that it is easier to be "false confident" as a "jerk", and signal abundance in that way, than to have true confidence based in the actions you take every day, and the life that you live. That is why we've seen this stereotype of the jerk getting the girl. However this jerk might not be a good fit for a relationship (and neither is the "nice guy" sucking up to the girl with an ulterior motive), as they will not be able to stay centered and confident over a longer period of time.
However it is probably easier to detect the "nice guy" and weed him out, than the jerk, as that more closely resembles true confidence.
Interestingly enough, having true confidence means you kinda come full-circle and end up being a person with clearly defined boundries and probably a clear driving force in your life. Thereby turning into a more interesting person, and a better "mating partner".
Interesting sources:
https://www.amazon.com/Way-Superior-Man-Spiritual-Challenges...
https://www.amazon.com/Models-Attract-Women-Through-Honesty-...
[1]: https://www.youtube.com/user/RSDTyler
[2]: The most engaged, but least attached: https://www.youtube.com/watch?v=cWaDDCjuM0w
Being "a jerk" to a woman signals that you don't especially value her. It puts her in a frame of mind that you yourself must be valuable to not value her or fawn over her like lots of men do. It makes her chase you instead of you chasing her (which is boring because women get that all the time).
Confidence is what makes it work, but I don't think it's the confidence alone.