The 27-year-old was placed under a restriction of liberty order during a hearing at Airdrie Sheriff Court this morning, which confines him to his home between 7pm and 7am for 16 weeks.
McGowan had previously admitted assaulting a police officer and breach of the peace.
McGowan will have to wear a tag and his punishment will rule him out of two upcoming night fixtures against his former club, Celtic.
The court heard McGowan “charged towards” two police officers who attended a disturbance at Wheatholm Street in Airdrie in the early hours of November 23 last year, and later threatened to kill them. He later kicked another officer on the body as his arrest was being processed at Coatbridge police station.
It was McGowan’s third such conviction for assaulting a police officer – while a St Mirren player he was sentenced to 130 hours of unpaid work and handed a one-year supervision order in January 2014 after admitting kicking two officers.
But Sheriff Derek O’Carroll spared him jail after hearing he had instigated regular counselling through PFA Scotland, the players’ union, in addition to social work sessions.
His solicitor, Liam O’Donnell, told the court that social work reports “finally give some indication that the accused is getting it in terms of his offending”.
O’Donnell added: “He was not in any trouble from the age of 16 to 23. At age 23 he separated from his partner. The reason he separated has been attributed to an underlying gambling problem.
“This gambling problem seems to be the root of his offending. When he takes alcohol his anger about the gambling problem seems to come out through aggression.”
O’Donnell revealed the former St Mirren player was undergoing voluntary counselling each week through the Paisley-based RCA Trust, which helps people with alcohol and gambling addictions.
“He is fully supported by his club,” he added. “The managing director of Dundee Football Club is present in court to indicate his support because he is addressing matters.”
After listening to the address, Sheriff O’Carroll reminded McGowan of the previous occasions he had been convicted of offences, in 2010 and 2013.
“And here you are again facing similar charges,” O’Carroll added. “It’s quite correct to say that you are on the cusp of custody and certainly that’s in the thoughts of the court.”
However, he proceeded to sentence McGowan to the tagging order provided he continues with the counselling.
“If you breach the order you will be brought back here and I have already advised you what the outcome will be,” the sheriff added.
Dundee managing director John Nelms, who was accompanied in court by players including captain James McPake, declined to answer questions outside court and revealed the Scottish Premiership club would make a statement later.
McGowan also declined to comment but O’Donnell said afterwards: “He is relieved with the outcome and he knows he needs to modify his behaviour. He appreciates the support of his club and others.”