Ryan Straw was breathless when he phoned the mother of his two children, while she was home alone on Pickard Street, on Sunday, August 19.
Moments later Straw began shouting for her to let him in, and pounded on her back window until the double glazing panes went through, and she filmed him on her phone.
Prosecutor Donna Fawcett said their ten year relationship had become volatile over the last few years and they had recently separated.
His ex had made reports to the police before, but had not proceeded with them, she added.
In a statement, the woman said: “He makes threats to kill me regularly but he has been making them more and more.
“I don’t know if he would kill me. I don’t know if he is capable.
“He is nothing more than abusive to me and I want him out of my life for good.”
While her statement was being taken by an officer, Straw rang no fewer than six times.
Mary Dixon, mitigating, said Straw made full and frank admissions at the police station.
She said the incident happened after “days of arguing”.
“He would say he received abusive messages from her,” she said. “He had been drinking. It was the heat of the moment.”
Mrs Dixon said it was “quite astonishing” that Straw had been on bail for so long.
She said he had not breached the terms of his bail since then, and had been prevented from seeing his children.
He had been off work following an accident, the court heard, and was suffering from depression.
Probation officer Raqia Bano told the court Straw had asked for help, and had struggled to deal with the end of the relationship.
Straw, 26, of Old Mill Lane, Mansfield Woodhouse, admitted sending threatening messages and criminal damage, when he appeared at Mansfield Magistrates Court, on Wednesday.
He was given a two-year community order, with 40 days of a rehabilitation activity, to address his temper, impulsive thinking and relationship skills.
He must carry out 60 hours of unpaid work. He must pay an £85 government surcharge and £85 costs, with £50 compensation for the damaged window. No restraining order was requested.