When Jaime King learned she would not be able to carry children, she felt broken.

“A big shift in me happened when I was diagnosed with endometriosis and polycystic ovary syndrome, which are very painful reproductive illnesses,” the “Hart of Dixie” actress revealed in the September issue of Galore. “I also had countless miscarriages and almost lost my children.”

King, 38, now a mother to two young sons — James Knight, 3, and Taylor Swift’s godson, Leo Thames, 2 — with husband Kyle Newman, initially felt ashamed that her body had failed her.

“I thought that because my womb didn’t work the way I was taught it should work, I was broken. We are told as women that our great value is to be able to carry life, to carry a child. If we’re fertile and abundant, we’re a worthy goddess. But for some reason, those parts don’t function for some of us,” King explained.

“When I was told I couldn’t carry a child, it crushed me in a way that was so much deeper than I could explain. I felt ashamed that I was suffering every day,” she continued. “I would wake up in pools of blood, and feel ashamed. And then I said, f–k this. I’m not going to be ashamed.”

By sharing her struggle, King hopes to let other women know that they’re not alone.

In addition to her difficulties conceiving, King also suffered from severe postpartum depression.”We need to talk about these things. We grow up with a mentality that menstruation is not supposed to be painful, and if it is, you deal with it yourself and don’t complain. We need to talk about this and spread as much awareness as we can. Girls as young as 12 get diagnosed with endometriosis and PCOS. When you’re living with it, it can be constant agony.”

“I isolated myself. I was anxious all the time, I felt like I was unlovable. I couldn’t even think straight. I had to live through an entire pregnancy where I didn’t know if my child was going to live or die. I couldn’t even process the trauma because I was too busy trying to keep him and myself alive,” King recounted.

Though she has thoroughly embraced motherhood, King recognizes the importance of tending to her own needs as well.

“The judgment of yourself as a mother is consistent. So I’m really trying to find my identity of who I am as a mom. I’m trying to realize it’s okay to go to lunch for an hour with a girlfriend. If we’re not nurturing our souls and the things we love, it’s easy to get lost and lonely.”