Jay Z and Beyonce Knowles watches a game between the Miami Heat and the Atlanta Hawks at American Airlines Arena on December 10, 2012 in Miami, Florida. (Photo by Mike Ehrmann/Getty Images)

Beyoncé gets extremely candid in her upcoming HBO documentary Life is But a Dream.

HBO describes the film, which debuts February 16, as “an intimate feature-length documentary,” directed and executive produced by Beyoncé.

In the documentary, the “I Was Here” singer talks for the first time about the miscarriage she had nearly two years ago, US Weekly reports.

“About two years ago, I was pregnant for the first time,” the Grammy winning singer says in one scene. “And I heard the heartbeat, which was the most beautiful music I ever heard in my life.”

“I picked out names,” Beyoncé recalls. “I envisioned what my child would look like . . . I was feeling very maternal.”

However something went wrong in the first trimester of her pregnancy. “I flew back to New York to get my check up — and no heartbeat,” she says. “Literally the week before, I went to the doctor, everything was fine, but there was no heartbeat.”

After her miscarriage, Beyoncé turned to her music as a coping strategy and penned what she calls the saddest song she’s ever written.

“I went into the studio and wrote the saddest song I’ve ever written in my life,” she says, although she doesn’t name the track. “And it was actually the first song I wrote for my album. And it was the best form of therapy for me, because it was the saddest thing I’ve ever been through.”

Beyoncé and her husband Jay-Z are now proud parents to their 13-month-old daughter Blue Ivy Carter, and Beyoncé revealed her joy of being pregnant the second time around.

“Being pregnant was very much like falling in love,” she exclaimed. “You are so open. You are so overjoyed. There’s no words that can express having a baby growing inside of you, so of course you want to scream it out and tell everyone.”

Follow Chris Witherspoon on Twitter at @WitherspoonC