11:54 AM PT -- Jeremy is firing back in legal docs of his own at Sonni's claims he abuses drugs and alcohol in front of their daughter ... stating she's making up the allegations because she's pissed their relationship never worked out and looking for a cash grab.
Renner insists he does not abuse drugs or alcohol and even states he submitted to random drug testing for 3 months to defeat Sonni's claims. According to Renner, those tests all came back negative and suggests Sonni is the one with a drug problem.
Jeremy states he even hired a mental health specialist to monitor his visits with Ava to prove he was both sober and a capable parent.
The docs also lay out a timeline of Renner's film releases and the history of Sonni's allegations against him -- including sexual and physical abuse of Ava -- suggesting Sonni plans her attack to bring Jeremy bad press during his movie runs.
Renner says Sonni's allegations stem from her psychological problems and he wants the court to limit her time with Ava until she gets treatment and shows she can, "overcome her overwhelming obsession with demonizing" Renner.
Renner says over the 1-year marriage, Sonni would brag to friends that she had "bagged an Avenger" and joked she wanted to introduce her own friends to fellow 'Avenger' cast members so they could "bag an Avenger as well."
7:33 AM PT -- A rep for Jeremy tells TMZ, "The well-being of his daughter Ava has always been and continues to be the primary focus for Jeremy. This is a matter for the court to decide. It's important to note the dramatizations made in Sonni's declaration are a one-sided account made with a specific goal in mind."
Jeremy Renner was coked up and drunk when he began rhapsodizing about killing his ex-wife Sonni, and the night ended with the actor shoving a gun in his mouth and threatening to kill himself ... so claims Sonni in new legal docs.
Jeremy and Sonni are in a battle royale for custody of their 6-year-old daughter, Ava. She's asking the judge to change the order from joint custody to sole custody on her part with monitored visitation on Jeremy's.
Sonni claims last November Jeremy was at a club, high on coke and booze, when he began talking about killing Sonni, telling someone he "could not deal with her anymore, and he just wanted her gone."
According to the docs, obtained by TMZ, Jeremy put a gun in his mouth, threatened to kill himself, and fired the gun into the ceiling while Ava was asleep in her bedroom.
Sonni claims Jeremy has a history of substance abuse, verbal and emotional abuse. The docs claim Jeremy repeatedly has been under the influence when he had physical custody of Ava. According to the docs, Jeremy once left coke on a bathroom counter which was reachable by Ava.
Sonni alleges in one instance, the nanny overheard Jeremy say he was going to Sonni's house to kill her and then kill himself, because "it was better that Ava had no parents than to have [Sonni] as a mother."
The docs claim Ava told Sonni various women would come and go from Jeremy's house, including "Tayler, Kelley, Natalie, Summer, Faith, Christina, Naz and Jessica."
We reached out to Jeremy's reps ... so far, no word back.