You build on failure. You use it as a stepping stone. Close the door on the past. You don't try to forget the mistakes, but you don't dwell on it. You don't let it have any of your energy, or any of your time, or any of your space.
I don't think there's any great mystery to writing female characters, so long as you talk to them. If you lived in a monastery and never met any women, maybe it would be difficult.

