Nicholas Nield was told he had attempted to cause "as much distress as possible" to the victim as he was locked up for three years and three months.
Leeds Crown Court heard Nield and the victim have lived in the same street in Cookridge, Leeds, since 2008.
Louise Pryke, prosecting, said they had previously got on well together until Nield became "paranoid" and began accusing the man of sleeping with his girlfriend.
Ms Pryke said the defendant also spread false rumours in the area that the victim was a paedophile.
The claims led to people shouting abuse at him when he went out.
Despite Nield's abuse, the victim had tried to help the defendant by giving him food and clothing when he heard that he had been using a food bank.
The prosecutor said Nield committed the offences against his neighbour in March last year.
Builders were carrying out work at the victim's home and witnessed Nield walking into the property and shouting abuse at him on a number of occasions .
The builders described the 40-year-old as a "constant nuisance" and the victim being "petrified" of him.
On one occasion he entered the ground floor flat and demanded that he sign a piece of paper.
He also brought a piece of wood into the property and told the victim to cut his hand on it.
On March 31 he turned up at the flat and said: "I am going to kick your head in and beat you up".
The builders told him to leave but he returned later that day with an axe.
He stood outside his bedroom window and shouted: "You are trying to get God off his throne.
"You are responsible for getting Trump banned from Twitter".
He then struck the window with the axe, causing it to smash.
Nield said to the victim: "I don't care if you call the police. I will be let off and I can do this again".
Nield, of Bedford Drive, Cookridge, pleaded guilty to harassment, possession of a bladed article and criminal damage.
He has previous convictions for burglary, robbery, assault, possessing a blade and breaching a non-molestation order.
Kate Bisset, mitigating, said Nield carried out the offences at a time when his mental health had deteriorated.
The court heard his condition had been made worse by his misuse of cannabis.
Ms Bisset said Nield had been in prison on remand since his arrest and he had managed to obtain qualifications in English and maths while in custody.
Ms Bisset added: "He has hope for the future if he is able to keep away from cannabis".
Nield was also made the subject of a restraining order banning him from contacting the victim for seven years.
Sentencing, Mr Recorder Kelly said: "It was your intention to cause as much distress as possible to (the victim)".