Judge Martin Nolan said that Ralph Currivan, aged 49, had been a “very good and law-abiding citizen” until this incident.
He said he had considered not jailing Currivan but the seriousness of what he had done left the court with no choice.
Currivan, of Dunawley Grove, Clondalkin, pleaded guilty at Dublin Circuit Criminal Court to assault causing harm of Janet Hazel at her house in Clondalkin on December 5, 2012.
He sobbed as Judge Nolan imposed a jail term of three years with the last 16 months suspended.
Garda Ruth Brett told Kerida Naidoo, prosecuting, that Currivan and the victim had been in a relationship but decided to take a break in November 2012.
On December 5, Currivan called to her home and she let him in. He told her “you can’t treat me like this” and became angry.
He pushed her against a wall and on to the floor before punching her in the head and eye. He grabbed a vacuum cleaner cord and put it around her neck.
Ms Hazel managed to get out and Currivan put his hands around her throat and tried to choke her. He then took a clothes iron and hit her with it.
He got a bread knife and said he was going to kill her before smashing an empty wine bottle on her head.
Currivan then stopped the attack before passing out in the bathroom having taken a packed of tablets.
In a letter read to court Currivan apologised for the pain he had caused.
“I cannot forgive myself. It has haunted me for a lifetime. I never meant any harm to Ms Hazel.”