Anthony Allen also shouted racist abuse at the woman as she walked down Perth Street, Derby, on April 3, last year, prosecutor Kat Shields told Derby Crown Court, on Thursday.
In early May, Allen made growling noises close to her and approached her for a lighter, and then stared at her.
And on May 21, when she came out of her home address with her child in a pushchair, he said: "You're going to die. I'm going to do it."
Harry Styles spotted with girlfriend Olivia Wilde on Derbyshire’s Chatsworth Estate
16 pubs and restaurants in Chesterfield and Derbyshire that have picked up top awards
Teenage boy rushed to hospital after being stabbed in neck – with four arrests made in Derbyshire town
17 photos show parched fields, dwindling rivers and barren reservoirs across Derbyshire – as drought is officially declared
Chesterfield drug dealer jailed over supply conspiracy with cocaine kingpin
Seven days later, as she was walking across Sussex Circus, Allen ran around the edge of the park so when she reached the end, he was in front of her.
He shouted: "Social services should have them off you. It's your fault."
The court heard Allen started offending "late in life" and the offences "were clearly linked to his mental condition.
Abi Joyce, mitigating, said Allen is suffering from paranoid schizophrenia and has served the equivalent of an 18 month sentence.
But she added two psychiatrists recommended a hospital order, saying it would be in his own best interests.
Allen, 32, currently of the Kedleston Unit, at Kingsway Hospital, previously pleaded guilty to four offences under Section 4 of the Protection from Harassment Act.
Judge Shaun Smith QC said he was satisfied, on the evidence of the psychiatrists, that it was appropriate for him to impose a hospital order so Allen can receive the best treatment.