EXCLUSIVE

Kesha was sexually, physically, verbally and emotionally abused for 10 years by her producer, Dr. Luke, to the point where she nearly died.

According to a new lawsuit -- obtained by TMZ -- Kesha claims Dr. Luke was abusive towards her almost from the get-go -- when she signed on with him at 18 -- and made repeated sexual advances toward her. She claims he would force her to use drugs and alcohol to remove her defenses.

In one instance, Kesha claims he forced her to snort something before getting on a plane … and during the trip he forced himself on her while she was drugged.

On another occasion, Kesha claims after forcing her to drink with him, Dr. Luke gave her what he called "sober pills." Kesha claims she woke up the following afternoon, naked in Dr. Luke's bed, sore, sick … and with no memory of how she got there.

Kesha says the alleged abuse led to her eating disorder -- a story TMZ broke earlier this year. She claims Dr. Luke said, among other things, "You are not that pretty, you are not that talented, you are just lucky to have me." As we reported, she claims he called her "a fat f***ing refrigerator."

Kesha also says there was physical abuse ... once she says he attacked her at his Malibu house where he was "violently thrashing his arms at her." She says she escaped and ran barefoot down PCH and hid in the mountains.

Kesha is asking a judge to let her out of her contract with Luke.

Kesha's lawyer, Mark Geragos, tells TMZ ... "This lawsuit is a wholehearted effort by Kesha to regain control of her music career and her personal freedom after suffering for ten years as a victim of mental manipulation, emotional abuse and an instance of sexual assault at the hands of Dr. Luke."

Geragos adds, "The facts presented in our lawsuit paint a picture of a man who is controlling and willing to commit horrible acts of abuse in an attempt to intimidate an impressionable, talented, young female artist into submission for his personal gain. Kesha is focused on moving her life and her career beyond this terrible time."