Luke Barron, 30, of Lee-on-the-Solent was spared jail at Portsmouth Crown Court for the ‘distressing’ incident.
The court heard the victim was left with bruises to the back of the neck and arms after a struggle in which Barron had forcefully ‘grabbed’ the child before delivering a ‘squeeze’.
The incident was reported to police with Barron, of Compton Close, admitting to officers he had overstepped the mark.
‘During interview he acknowledged he had been rough,’ prosecutor James Kellam said.
Judge, Recorder Charles Langley, added: ‘It happened very quickly and was relatively short-lived and was born out of frustration.’
Mr Kellam said of the impact on the young child: ‘It was a very distressing situation. It would have been very upsetting at the time.’
Barron admitted a charge of assault occasioning actual bodily harm.
The court heard how Barron had a previous battery offence from 2019 in which he assaulted his partner after she dropped a suitcase. ‘He put her on the floor and punched her,’ Mr Kellam said.
Daniel Reilly, defending, said: ‘He accepts there is a problem and has an inability to deal with matters properly.
‘He is someone who recognises he needs help.’
Barron had sought out help from an organisation to help curb his ways and had been prescribed anti-depressants after having ‘thoughts of taking his own life’.
Mr Reilly said Barron was ‘remorseful’ and regarded as a ‘hard worker’ who was prepared to work as a pizza delivery driver during the evening on top of his main job.
He added: ‘(Barron) has taken steps to address his behaviour by getting voluntary help.’
The court was told the defendant was a ‘low risk of serious reoffending’ and had a ‘realistic prospect of rehabilitation’.
SEE ALSO: Prison staff car set on fire
Barron was spared jail and was instead given a 12-month sentence which was suspended for 24 months.
As part of his sentence he must also complete 30 rehabilitation days and do 120 hours of unpaid work.
Barron was told to pay £300 costs for the case.