Will Smith has revealed that he had such an extreme reaction to his first-ever heartbreak that he developed a "psychosomatic reaction" to having an orgasm.

The Philadelphia hip-hop legend explained in his just-released memoir, Will, that his first serious relationship with a girl named Melanie when he was a youth ended after she cheated on him while he was on a two-week music trek. Melanie's infidelity in their relationship was so devastating to him that he engaged in excessive and indiscriminate sex as a coping mechanism for his heartbreak.

"I desperately need relief but as there is no pill for heartbreak, I resorted to the homeopathic remedies of shopping and rampant sexual intercourse," Smith wrote in his book, according to a Buzzfeed article published on Tuesday (Nov. 23).

"Up until this point in my life, I had only had sex with one woman other than Melanie," he added. "But over the next few months, I went full ghetto hyena."

Apparently, his rampant sexual activities affected his body because the Grammy-winning rapper developed a "psychosomatic reaction" to ejaculation.

"I had sex with so many women, and it was so constitutionally disagreeable to the core of my being, that I developed a psychosomatic reaction to having an orgasm," Smith penned. "It would literally make me gag and sometimes even vomit."

However, Smith soon realized that his sexual escapades were actually his way of looking for love in the wrong places. Nevertheless, he and Melanie briefly reconciled and ultimately broke up for good.

Meanwhile, Smith’s sex life with his wife, Jada Pinkett-Smith, is a little spicier.

In his book, Smith also wrote that he was determined to satisfy Jada by any means necessary after tying the knot with her in December of 1997.

“We drank every day, and had sex multiple times every day, for four straight months,” Will wrote.

For the record, the couple have been married for 26 years and have two children together: Jaden and Willow. It must have worked.

Check out Will Smith’s Will book tour performance in Philadelphia below.

See the Most Recognizable Looks in Your Favorite Rappers' Careers

Nicki Minaj, Future, Lil Uzi Vert and more.

More From XXL