The police had to be called several times to have Mark Jones removed from the property in Castleford earlier this year, before he went onto attack his former partner months later.
He appeared at Leeds Crown Court this week after being held on remand and admitted a charge of harassment, assaulting occasioning actual bodily harm and criminal damage.
Prosecutor Anthony Moore said that 53-year-old Jones had been in a relationship with the woman for a "number of years" but they split in November last year. She remained at the family home with their children.
He was permitted to attend the home to see the children, but during a visit on April 10 at around 4pm he began arguing and tried to push his way into the property, so the police were called.
He was arrested but after being released he went back to the house and began banging and shouting at the window, even grabbing a ladder and banging on the upstairs window and climbing onto the roof.
Again, the police were called and he was found hiding in a shed. Giving him the benefit of the doubt, they took him back to his home on Barnsdale Road in Allerton Bywater.
However, he returned for a third time in the early hours on April 11, banging on the windows, so the police returned and he was arrested again.
Months later on July 23, Jones went to his ex partner's home at around 6pm to speak with her about a bank card.
Mr Moore said Jones was argumentative, began making accusations about her personal life and became aggressive.
He then grabbed her by the throat and moved her around the room, before picking up a cleaning spray bottle and spraying it in her face.
Mr Moore said that Jones "anticipated that it contained bleach", but which turned out to be diluted fabric conditioner, which covered both of them.
He then threw her to the floor and kicked her in the ribs while calling her names.
After being arrested he then ripped up a custody blanket while in his cell, which led to the criminal damage charge.
He was remanded into custody.
Mitigating, Peter Malone told the judge that Jones was "ashamed to be before you today".
He added: "He understands the way he behaved was completely unacceptable and it's quite clear that he could not accept that the relationship had come to an end.
"He is in custody because of his actions and there's no excuse for what he did."
Mr Malone said that Jones, a bricklayer and plasterer by trade, had a long-standing issue with alcohol and had been drinking prior to the two incidents.
He was also a recovering heroin addict and was on a methadone prescription.
Judge Rodney Jameson QC gave him an eight-month jail term, but suspended it for two years, ordered him to take part in a relationships programme and handed him a 10-year restraining order to keep him away from his former partner.