I spend so much time feeling chagrinned by my gender (and race and nationality), it's good to be reminded that our culture has failed XY people. I really don't believe we males are genetically predisposed toward cluelessness and insecurity, so it must be in the way we're socialized.
That said, your ex sounds like he had issues, and it wasn't your responsibility to fix them.