When I experienced supply and latch issues while breastfeeding my newborn daughter last summer, I was initially unfazed. I might face an uphill battle, I thought, but I would give breastfeeding all I could. “Breast is best,” the World Health Organization and countless other resources assured me. I would settle for nothing less.

I scoured endless breastfeeding-focused websites and secret Facebook mom groups for tips and tricks. I enlisted three separate lactation consultants, one of whom paid an in-home visit for the princely sum of $800. They suggested tactics such as ditching gluten, using an elaborate system of “SNS” tubes to feed my daughter and lasering supposed tongue ties. I downed lactation supplements, dialed up my calorie intake, engaged in round after round of “power pumping” sessions and manually expressed milk to better encourage flow. In the end, though, efforts to traditionally breastfeed proved futile. I pumped for six months before weaning, hating every moment.

“Maybe you should consider cutting yourself a break,” my OB/GYN said gently at my three-month postpartum visit, to which I’d shown up near tears. I didn’t listen: In my mind, to quit was to fail. When I finally pulled the plug three months later — a tear-splashed, guilt-ridden and physically painful process — a haze lifted and color returned to the world. My robust and happy daughter, whose feedings had, by necessity, already included supplemental formula, didn’t register that anything in her diet had changed.

Months later, I began to question whether things might have played out differently had I not equated transitioning to formula with defeat. Perhaps I might have abandoned my breastfeeding ambitions earlier — accepted what was — and in the process, made myself less miserable. I wondered: How and when do other women decide to stop breastfeeding? Was my experience an outlier?

For many women, the decision to stop nursing is deeply tied to mental health. It’s often a difficult one: Michelle Yang, a mental health advocate and writer living in Seattle, experienced serious guilt when she stopped breastfeeding her 1-month-old son. In the course of two decades living with bipolar disorder, Yang has achieved success and stability with help from medication. She stopped taking it while pregnant, however, a decision supported by her doctor. Things were going swimmingly until the final stages of her pregnancy, when she started to suspect that something was off. After experimenting with an alternative, nursing-friendly medication, Yang went back on her original prescription, which she did not feel comfortable taking while breastfeeding.

“Of course, I wanted to give my child the best of everything that I could offer, and so it was really heartbreaking,” Yang recalled. “But I also knew that I needed to be present for my child.”

It was a similar calculus for Robyn Celestino, a special-education teacher in Rockville, Md., who struggled to pump for six weeks after her daughter’s arrival. Though she had hoped to traditionally breastfeed, her daughter’s cleft palate made an adequate latch difficult. An oversupply of milk and two bouts of mastitis — one of which landed Celestino in the hospital — complicated things further. The crushing anxiety that she might develop mastitis again was overwhelming. She also fixated on the thought that hours devoted to pumping were at the expense of precious bonding time with her daughter. “I was like, ‘I’m done. I need to wean,’ ” Celestino said. Months later, she remained shaken by the experience and sought treatment for post-traumatic stress.

Sinmi Bamgbose, a reproductive psychiatrist at Cedars-Sinai Medical Center in Los Angeles, estimates that about 20 percent of her female patients who desired to breastfeed experienced difficulties. “I’ve seen that breastfeeding can become this fraught emotional experience where there’s a lot of anxiety leading up to it,” Bamgbose said. Worries related to underfeeding, painful feeding and maintaining supply are all too common. “And then after, too, to the anxiety of, ‘Did he eat enough? Did I do enough? Now I have to go through the whole thing all over again.’ It can just become this perpetuating cycle.” And that supposed oxytocin boost that some studies suggest breastfeeding can give new mothers? It’s unclear if a measurable benefit remains when breastfeeding itself is a source of anxiety and pain.

Bamgbose doesn’t believe the “breast is best” messaging is helpful to many of these mothers. Although a multitude of studies tout the benefits of breastfeeding — including lower rates of sudden infant death syndrome and a boosted infant immune system — they are often used to underpin recommendations to breastfeed exclusively, and those recommendations frequently lack important nuance. Studies that take into account the mental health of the mother and its effects on a child are a rarity.

“The assumption is that you’re going to breastfeed, whereas the question should be: ‘Okay, have you thought about breast versus formula? What do you want to do?’ ” Bamgbose said. Mothers who work outside the home often don’t have the luxury of breastfeeding or find it too taxing, putting them in an impossible bind. “It should be normalized that it’s an individual decision that [parents] have to make.”

Part of what encourages guilt is the language in which breastfeeding is coded, believes Sarah Firshein, a travel writer and editor based in New York City. Firshein fed her son for three months through a combination of traditional breastfeeding, pumped breastmilk and formula before transitioning fully to formula. When we discussed the notion of normalizing “quitting” breastfeeding, she pointed out the weight of that word: quitting.

“I think that it speaks to this larger expectation that women are supposed to be doing something and then they stop,” Firshein said. Instead of saying that she “stopped breastfeeding,” Firshein prefers to say she “transitioned to formula feeding.”

“To me, it kind of levels the playing field a little bit,” Firshein said. “It makes both choices equal.”

Yang agrees that the language around breastfeeding seems to encourage feelings of guilt. In her Seattle groups for new mothers, she often felt judged for her decision to stop nursing. “Even people who meant well gave me backhanded comments,” she recalled.

“They said, ‘Oh, at least you were able to give your baby your colostrum,’ ” a.k.a. the thick, antibody-rich substance that breasts excrete before producing milk. “I was already dealing with a lot of guilt and postpartum depression and anxiety around being the best mother that I could be. Those experiences really stung and stayed with me.”

For Elisabeth Brodbeck, a lack of weaning resources made an already emotional end-of-breastfeeding experience more difficult. Brodbeck, who carried her partner’s embryo during pregnancy, hoped to do the same in reverse for their second child. However, that meant stopping breastfeeding when the pair’s son was 10 months old, which would allow Brodbeck to undergo in vitro fertilization treatment.

Brodbeck anticipated that “ending my breastfeeding journey with my son prematurely” would be heart-wrenching, but didn’t foresee the physical challenges ahead. “Weaning turned out to be more painful than any other aspect of the journey,” she said. She often found herself excruciatingly engorged and without a clear idea of how to address her discomfort. Although more support for breastfeeding women exists today than in the past, weaning-centric resources remain in short supply. In their absence, Brodbeck found herself at a loss for how to proceed.

“Do you let yourself become engorged? Do you release some milk to prevent engorgement, which can lead to mastitis? I didn’t understand how my body would stop producing milk if I had to pump or nurse briefly to prevent engorgement,” Brodbeck said. She consulted with resources, including La Leche League International and the site kellymom.com, but she mostly spoke with friends to compare notes and experiences. “In the end, I was able to wean, but I definitely tried to Google my way out of the problem, because I didn’t have the answers.”

Bamgbose believes a lack of weaning support can be detrimental to a mother’s mental health. It also may affect her decision to stop breastfeeding, which in turn has potential to cause more problems. Weaning “can be so difficult for women, and I think they need more support than they think they do,” she said. Consulting “somebody who specifically has worked with a lot of women who’ve gone through this process — and can help you deal with the complex emotions about guilt and relief of not having to do it anymore — would be very helpful.”

Although it might be helpful to seek out a reproductive psychiatrist such as herself, Bamgbose admits that they can be hard to find. “I would recommend they first talk to whoever they have access to,” she said. That might be an OB/GYN or their child’s pediatrician, or perhaps a doula, midwife, therapist or lactation consultant. “There are some online support groups, [like] through Postpartum Support International, that could be really supportive to a person during this time.”

Of course, not every woman I spoke with had a fraught end-of-breastfeeding experience, nor did they uniformly experience feelings of guilt. For many mothers, knowing it was the right time to stop nursing was as simple as a child pushing away a breast. But those whose experiences fell outside this mainstream narrative — myself included — were often quick to place blame on themselves. Postpartum mental health support might have helped me, Bamgbose said. But access to it is often out of reach.

“In general, mental health services are hard to access for anybody because of the cost,” she said. Many mental health providers don’t take insurance, and in major metropolitan areas, the cost of a single session can range between $150 and $450. Practitioners who do take insurance are often fully booked. Never mind the stress of having to navigate the health-care system when you’re already struggling mentally. The key, Bamgbose believes, is a robust system in which regular checks on mothers’ mental health are done at regular OB/GYN and pediatrician visits.

For Yang, the passage of time — six years — has helped put her breastfeeding experience into perspective. “You know, my kid is thriving. He hardly ever gets sick. He’s brilliant and hilarious and all the things that a parent would love in their child,” she said. “I just wish that there was more compassion for everybody’s experiences.”

Rachel Tepper Paley is a writer in Brooklyn, N.Y. Follow her on Twitter @RachelTepper.

More from On Parenting: