The Wimbledon runner-up withdrew from the Montreal tournament on Saturday citing “personal reasons“.
It came after she was beaten 6-1 6-0 by Johanna Konta in less than an hour in San Jose.
“Last week was not easy for me. Not only was I accepting some tough personal stuff, but I just was in a funk. Mostly, I felt like I was not a good mum,” she said on Instagram.
“I read several articles that said postpartum emotions can last up to 3 years if not dealt with.”
Williams, a 23-time Grand Slam champion, came back to the tour after giving birth to her daughter Alexis Olympia Ohanian Jr in September 2017.
In her Instagram post, the 36-year-old said she has talked to friends and family about her feelings and knows her emotions are normal.
“It’s totally normal to feel like I’m not doing enough for my baby,” she said, while trying to be “the best athlete I can be”.
She added: “However, that means although I have been with her every day of her life, I’m not around as much as I would like to be.
“Most of you mums deal with the same thing.
“Whether stay-at-home or working, finding that balance with kids is a true art. You are the true heroes.”
She ended by telling her followers, “if you are having a rough day or week, it’s OK – I am too”.
Williams suffered life-threatening complications after the birth of her daughter.
After a tentative start in her comeback, she found her form to reach the Wimbledon final, where she was beaten in straight sets by Angelique Kerber.
Williams has been open about her struggles with motherhood and her desire to inspire other working mothers.