Shaun Johnson admitted assault by beating of an emergency worker and common assault of an emergency worker at Welshpool Magistrates' Court on Tuesday, four days after he was arrested.
Police were called to his home in Lon Derw, Newtown, at 1.40am on Saturday after he said he was fighting everyone and there was a ruckus.
Prosecutor Helen Tench said that as two officers arrived, one saw Johnson walk towards them with something in his hand. Despite being asked to stop, he continued to head towards them - with one officer even drawing her Taser - until he reached their van and tried to open the back door.
He was then told to get to his knees with his hands in the hair, which he did, but as the officers went to put handcuffs on the 40-year-old, he then shouted "boom" and got up.
Mrs Tench quoted one of the officers who said she feared for her safety as he subsequently ran towards her and then fired her Taser, missing the first time but hitting Johnson on the second firing, forcing him to fall to the ground.
However, the defendant then "lashed out, making contact with the jaw" of one of the officers and leaving him in pain which could he still felt two hours.
Mrs Tench said that Johnson later explained to officers he had visited Newtown police station earlier in the day and had been taken to Royal Shrewsbury Hospital to seek mental health support but was sent home.
"He phoned police in order to be arrested and taken into custody," she said. "He said the officers took too long to put the handcuffs on, why he shouted 'boom'. He wanted to be handcuffed, Tasered and put in the van."
Mitigating, Robert Hanratty said Johnson "felt he was in a situation of meltdown" and was in a "state of some panic".
Probation officer Jordan Davies said Johnson felt he wanted mental health support, which is why he visited the police station earlier that day. Mr Davies said that after he was taken to Shrewsbury, "the hospital saw nothing wrong", but added that ... had taken cocaine the night before and taken four diazepam tablets on the day of the incident when he should have just had one.
"He regrets his actions towards the officers while they attempted to help him," Mr Davies added. "He never meant to scare them."
Johnson was fined £200 and ordered to pay compensation of £100 to each officer. He was also told to costs of £85.
Magistrates also handed him a 12-month community order with a nine-month drug rehabilitation order which includes 15 rehabilitation activity days