A sheriff in Kirkcaldy has asked for mental health checks on Stephen Gough after the naked rambler broke down in court.

Gough, 53, from Eastleigh, Hampshire, has spent nearly all of the last six years in Scottish jails, including long periods in solitary confinement at Perth prison, after repeatedly being arrested for failing to wear clothes in public or in court.

He was nude again at Kirkcaldy sheriff court on Thursday to face another charge of breach of the peace after his arrest on the outskirts of Dunfermline in July, three days after his release from his last term of imprisonment at Perth.

During the final stages of a two-hour hearing at which Gough represented himself, the former soldier broke down in tears as he made closing remarks in his own defence.

He had been agitated and seemed near to breaking down earlier in the hearing, prompting the sheriff, James Williamson, to order criminal social work reports into Gough's mental wellbeing before sentencing. Gough told the court he had last had psychiatric tests or social work evaluation several years ago.

In his emotional final plea, Gough, heavily bearded and gaunt, referred to allegations made by the prosecutor, Brian Robertson, and complaints from two civilian witnesses about the alleged impact on their children of seeing him walking naked through Townhill, near Dunfermline.

His voice breaking before he began audibly sobbing, Gough said: "There's nothing about me as a human being that is indecent or alarming or offensive. That's where I'm coming from, which is deep inside.

"So this provocative nature that the man [Robertson] is suggesting I have is nothing of the kind. It's me, standing up for what I am. [Because] all of us are human beings too and we have children and our children are beautiful and we're beautiful too, because we're human beings – all the same. I have nothing to be ashamed about. I'm just a bloke standing up for the truth of what I am."

Williamson told him: "There were certain points in your evidence and certain points in your summing up where I was concerned about your emotional behaviour, and I was a bit concerned as to whether or not you were in control of yourself. I want somebody independent to see whether your mental health is all that is should be because, in the absence of any good reason otherwise, you're going to end up serving prison sentence after prison sentence."

Gough was arrested by Fife police about 300 metres from a children's play area on Friday 20 July after several 999 calls were made from residents complaining that a naked man with a rucksack had been walking through Townhill, worrying and upsetting their children.

One prosecution witness, Michelle Solway, who said her 10-year-old daughter had been allegedly shocked by seeing him naked on the roadside, refused to look at Gough as he sat in the dock, answering his questions by staring fixedly at the floor, her arms clasped across her chest.

Gough, who achieved fame and some notoriety for twice walking from John O'Groats in the far north of Scotland to Land's End in Cornwall, had already walked for two days from Perth after leaving prison in the nude. He has refused to abandon his goal of walking naked back to Southampton, on the south coast of England.