She wrote: “For years I have dedicated myself to increasing awareness of mental health and empowering people to recognise when it’s time to seek help, support and guidance from those that love and care for your wellbeing.
"I recently listened to the same advice I have given thousands around the world and sought help from a team of healthcare professionals.
“Today I proudly, happily and healthily stand here as someone who will continue to always lead by example as I tirelessly advocate for the betterment of those in need.”
Williams has previously discussed her struggles with her mental health.
In an interview with American chat show The Talk in October she revealed she had experienced suicidal thoughts. She said: “I didn’t know until I was in my thirties what was going on. I just thought it was growing pains. I’ve been suffering since the age of between 13 and 15. At that age, I didn’t know what to call it.”
Williams, 37, joined Destiny’s Child in 2000. The group sold more than 60 million records, making them one of the most successful female groups of all time.
They broke up in 2006 but have performed together since, including with Beyoncé at the 2013 Super Bowl halftime show and at Coachella in April.
Katy Perry, 33, has also revealed in an interview with Vogue Australia that she suffered from depression over bad reviews of her latest album.