The American 23-time Grand Slam singles champion initially withdrew from the tournament citing “personal reasons”.
Williams, 36, returned to tennis earlier this year after giving birth in September 2017.
She reached the Wimbledon final in July but last week suffered the heaviest defeat of her career.
Williams’ 6-1 6-0 loss to Britain’s Johanna Konta at the Silicon Valley Classic event was the first time since turning professional in 1995 that she had failed to win at least two games in a match.
In a post on Instagram, Williams explained that she had been struggling with post-natal emotions – but went on to stress such feelings were “totally normal” and urged other mothers not to suffer in silence.
“Last week was not easy for me,” she said. “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 mom.
“I read several articles that said postpartum emotions can last up to three years if not dealt with. I like communication best. Talking things through with my mom, my sisters, my friends let me know that my feelings are totally normal.