Jonathan Asser used to struggle with his extreme rage until he learned to master it – and discovered a skill for calming violent prisoners. His experience led to a film and best-newcomer award at the London Film Festival

"You fucking pussy!" Errol yells at me in his first group. He's been putting pressure on Dwayne, who I can feel is about to kick off, so I've intervened to bring Errol's focus on to me. "You fucking motherfucking prick!"

Errol's pacing veers closer and closer to me with each pass. He points at me. "I will fucking fuck you up right now!" I'm scared, but it isn't fear that holds my attention. It's shame. I'm totally and utterly focussed on the excruciating feeling of exposure throbbing through me as Errol heaps disrespect on me in front of the group. And I know, from years of experience working in the heat of the moment with the most dangerous men in HMP Wandsworth, that we can get through this.

I could sense when Dwayne's feeling of disrespect – of his rising shame – was going to make him blow. Now, as those explosive muscles bunch under his blue prison sweatshirt, it's "shame awareness" that continues to tell me how to work with Errol.

I don't look directly at him, and I don't say anything, both of which at this moment would push him over the edge. Instead I communicate by sitting with my shoulders open and directly facing him, which shows I'm giving him my full attention and taking the risk he poses very seriously, while also showing the rest of the group I have the confidence to manage his risk. Every nuance of my body language is critical right now.

There are three locked steel gates and two doors between me and the nearest member of staff, yet my finger never creeps toward the alarm button on my radio.

Leon Brown: 'They had a psychologist at Wandsworth, but she was unable to deal with me. SVI kept it real. In there I learned how to use my influence for the good of others, instead of using it to intimidate people. One day I want to set something up to help ex-prisoners integrate, otherwise, you feel like you’re on Mars when you get out.' Photograph: Antonio Zazueta Olmos for the Observer

I'm still sitting on the biro-stabbed foam of my chair, both my feet planted on the vinyl floor. I'm doing something no other solo officer, governor or civilian at this level of escalation with Errol in this prison would do. I'm controlling my fight-or-flight response; I'm offering Errol a high-status alternative to violence.

Then Errol does something else: he walks behind me. My fear spikes, but I don't turn round. He goes silent. I keep looking forward. I can't lapse even a millimetre into any kind of involuntary, fear-conditioned reaction, or he will attack. I stay with my shame. Other members of the group can see my fear, but they're also seeing that it doesn't control my behaviour. For the benefit of Errol, who's unable to see my face right now and read the fear in my eyes, I let him know about it by using words.

"Errol, I want you to know that I'm frightened and I would really appreciate it, please, if you'd walk back round into my fucking field of vision." The other members of the group, by watching and waiting in a relaxed but alert way, are backing me by staying out of their own fight-or-flight response. Our bond of trust is intact, and protecting that bond is what motivates me to manage this level of risk.

You see, the options are: a) violence, which transforms the feeling of shame and exposure into one of apparently potent self-confidence and force; b) running away – less desirable, especially in prison, because it comes across as weak and therefore makes you more vulnerable further down the line; or c) staying with the shame, feeling it and being fully in touch with it. By taking this last option, I'm able to hold my ground with Errol instead of backing off, calling for assistance, outnumbering him, and subjecting him to physical control and restraint.

It tends only to take being involved in one of these sessions for a member of the group's shame awareness to be activated and for him to begin to read escalations earlier and more accurately in real time, which renders shame and disrespect less threatening, which gives him the confidence and the skills to begin to work differently with his fight-or-flight response. And with prisoners of this level, that could mean fewer victims. It might even save lives.

Wayne Armstrong: 'I was violent in Wandsworth. The officers bent me up a number of times and had a six-man team to take me down the block. But the more they tried to do to me, the worse I got. Then one officer got Jonathan to speak to me and I ended up joining SVI. I learnt how to express myself better without having to use my fists.' Photograph: Richard Saker for the Observer

From my earliest memories, aged four, I felt as if I didn't exist and that I wasn't human. Despite my complete physical and emotional rejection of my mother, neither my mother nor my father seemed to notice. The best thing was my father's rage, which though terrifying did make me feel alive. Escalation was something I needed and craved.

I was sent to my first boarding establishment, the Dragon School, at eight. My mother picked me up at the end of my first term. She had my brother, a year younger, with whom I now have a close relationship, in the back of the car. I got in the passenger seat. My brother made a comment. I can't remember what it was – perhaps him just simply breaking the silence was enough – and, based on my past aggressive behaviour, my mother's instinctive reaction was to throw her body across the inside of the car to protect him from me.

But I hadn't moved. I stared at her as if she were mad. Boarding had worked. Not only was my brother now safe, but my ongoing hatred for my mother had, within minutes of walking away from both my parents without saying goodbye, completely disappeared. I was cured. A new outlet for my feelings emerged though: killing animals. Blood sports became a way for me to achieve a sense of power and control.

This was something I also achieved at Radley College, my second boarding school, aged 14, where I was part of a gang involved in targeting and physically bullying weaker boys. Eventually I was caught and punished, which was crucial to making the most vulnerable in the boarding house feel safer. But I had no empathy whatsoever for my victims, and nobody in authority felt it important to find out why. I wonder whether that attitude shifted when Roderick Newall, a friend of mine from the same boarding house, killed his parents a few years after we left.

Jack O'Connell playing Eric in Starred Up. Photograph courtesy of PR

I managed to maintain the outer shell I had constructed around my deadened self all the way through university. Within two months of being outside a total institution, however, violently self-attacking thoughts first struck. A year saturated in shame and fear passed before I told a school friend about what was going on.

He didn't get it. Next, I told my parents. They didn't get it either. Then I told my GP, who had me assessed by a psychiatrist and then placed with a psychoanalytic psychotherapist whom I was to see for years between one and five sessions a week. In between sessions, I turned to writing. A performance poetry character, a predatory psychopath, started to develop, and I got small gigs upstairs in pubs, or in arty cafés.

My therapist asked me what would happen if I allowed myself to feel anger in the sessions. I replied immediately that I'd kill her. She continued to see me privately in her own home, installed an alarm button, and chose to manage the risk rather than break the therapeutic alliance we had formed. Then, in 1998, through a friend from university who had gone into the prison service, I was invited in to Feltham Young Offender Institution to give a creative writing workshop. As the series of gates clanged shut behind, as the cellblocks loomed, as a prisoner shouted out a probingly hostile comment to me through the mesh on the exercise yard, I felt I was home. I knew I was equipped with what it took to thrive here. Awash with anxiety, bewilderment and fear in the outside world, I had found a new brick mother, a new total institution that could once again make things simple and safe. The emotion I felt was akin to love.

In general, most prisoners comply with the regime and present few behavioural problems. A visible minority direct their aggression inwards, however, manifesting in various forms of physical self-harm, like cutting. For both these groups – the compliant majority and the physically self-harming minority – there are programmes on offer to help them progress. There is a third group, though, another minority, who direct their aggression not at the self, but at others through bullying, threats, fights and assaults.

Apart from punishment and segregation, nothing else is normally offered in response to the violence committed against others by these often brutalised and institutionalised inmates. The problem with a reactive approach, however, is it does nothing to get to the root of the behaviour and nothing to help give these people the skills to deal non-violently with future conflicts which, by concentrating dangerous people, the prison environment itself helps create. With no mediation, disputes fester, build and inevitably end up in the community after release. Prison creates this risk, yet nothing is done about it.

There are nationally accredited offending behaviour programmes in prison designed to reduce violence, but normal practice is that prisoners currently being violent are not allowed on such programmes; the acute emotional charges that cause violence are also not allowed. There's an obvious credibility gap: courses designed to tackle violence outside sessions demonstrate no ability to tackle both the prisoners and the emotional triggers that might cause violence inside sessions.

The offender, sometimes on camera, is often invited to speculate on what he might do after he's released if he happens to be faced with an invented scenario, say another man talking to his girlfriend. Because prisoners are under no emotional pressure, they can easily work out the "right" answers; those who have done the course can even share the "right" answers with other prisoners before they enrol. Owing to the fact that release can be dependent on completion of such courses, it could be argued they may do more harm than good by pressurising coerced individuals into telling lies to gain freedom, which may inadvertently train prisoners how better to avoid detection once they're out.

Basil Abdul-Latif: 'From the age of 16, when I first went jail, I was a problem. I smashed up the mosque. They shuffled me around the system so much that I felt like I was on a sightseeing tour. Once I met Jonathan in Wandsworth, things began to change. Since leaving prison in 2009, I haven’t been back. I was even cast in Starred Up with a speaking part and appeared on the red carpet. Photograph: Richard Saker for the Observer

It was during the creative writing workshop at Feltham that I found I was interested in listening to prisoners and helping them interact. I started working in the prison's education department, running discussion groups on topics chosen by the prisoners themselves. Sometimes it got heated. Less-violent prisoners found it wasn't for them and opted for other "lessons". More violent prisoners, particularly those further up the gang hierarchy for whom the protection of status was paramount, appreciated the chance to express themselves without having to look over their shoulders. My agenda was not to change the way others thought or felt, it was not to rehabilitate – it was to connect.

When funding stopped in Feltham, I found a similar position at Wandsworth. My personal therapy gave me the tools to work with others, and the fact I was myself institutionalised and alienated made it possible and meaningful for me then to make links with those who had also been brought up mostly in institutions. With the exception of psychotic prisoners being treated through the healthcare department, every violent incident I have ever come across in prison could be traced back to shame and the feeling of being disrespected. Conventional programmes working outside the heat of the moment studiously avoid the crucial shame trigger. I worked with it every day. I came up with the name Shame/Violence Intervention (SVI) to describe my approach.

As well as running larger groups, the idea was to use the segregation unit to mediate between prisoners who'd been in conflict and from there reintegrate them safely back on to the prison wings from which they'd been ejected. Staff victims of assault or threatening behaviour also took part in these sessions. Some of the participants, like Leon Brown and Basil Abdul-Latif, ended up working alongside me in the segregation unit. Wayne Armstrong helped me after release to run probation groups for high-risk offenders. While the small groups in the segregation unit tended to focus on recent prison violence, the discussion in larger groups on the wing could be free-ranging, taking in topics including race, sex, religion and family relationships.

While I'd dropped the performance poetry soon after beginning my prison work, I'd continued writing for the page. I got published and a fellow poet, Marie-Louise Hogan, suggested I might like to have a go at screen writing. I found that I enjoyed the process, which helped me unwind outside the intensity of SVI sessions, and I began enrolling on Arvon screenwriting courses to learn more about the craft and get feedback from the tutors.

I plugged away for six years on my first feature script, a prison drama called Starred Up. Then one of the tutors, AL Kennedy, showed it to a producer and I was stunned when director David Mackenzie got in touch to say he'd like to develop the screenplay with me and make it into his next movie. The fictional prison backdrop we eventually settled on expressed how I felt about the way SVI was stopped.

In October 2010, I notified Wandsworth of a visit counter-terrorism officials wanted to make to my sessions. Because these officials were concerned about a possible link between gang culture and radicalisation, a concern reinforced last year by the shocking murder of Lee Rigby, they wanted to experience SVI for themselves to make an initial assessment about how/if it could/should be supported. The day after I had notified the prison of their visit, however, following 12 years' uninterrupted deployment, the Wandsworth security governor promptly suspended the group.

The head of offender safety then withdrew my access to the prison. I was asked to return weeks later for a couple of hours, not to work with prisoners, some of whom I later found out no longer felt safe in Wandsworth, but to attend a meeting chaired by the Wandsworth deputy governor, where I was introduced to a National Offender Management Service (NOMS) representative at London area level who had, in my absence, to my astonishment, despite the fact that I was at that time delivering it for free, terminated SVI altogether.

Director David Mackenzie on the set of Starred Up. Photograph courtesy of PR

I managed to negotiate at that meeting a small number of conclusive SVI groups, one of which was attended by the counter-terrorism officials, who said that their visit had been "extremely inspiring". One of the officials then met with the governor to see if there was anything that could be done to save the programme, but it was to no avail.

I still don't know why they closed it – the administrative reasons given don't add up. I received letters from supporters including from the vice-chair of the All-Party Parliamentary Group on Penal Affairs, the chief executive of Victim Support, and the London area manager of Crimestoppers, who, unlike those involved in the closure, had all visited the SVI group in the past. SVI had won a national award for innovation, had an endorsing independent evaluation, and participants' recorded violent incidents dropped outside sessions. Despite targeting prisoners excluded from other programmes because of their violence, some of it with each other, there was never a single contact violent incident in any SVI session throughout the time it ran, and never a single contact violent incident between sessions involving active SVI participants.

Let's go back to the start, to Errol, still out of sight, but the detonation of shame pulsing through my body starts to ease. My experience tells me this means the threat Errol poses is subsiding also. Steve relaxes in his chair.

Marvin rolls a cigarette, sticks it behind his ear in preparation for the journey back to the wings. My shame level subsides further. We wait. Errol walks back into my view. It's still critical. He lingers. Any hint of triumph from me and he could attack.

Errol hesitates and gauges my neutral reaction, made possible by the fact that I am tracking my shame all the way as it diminishes. I am staying with it even as the pressure comes off. Errol sits back down in the circle. Dwayne nods Errol an acknowledgement. Errol nods back, looks at me. I hold his gaze. "That's amazing work, Errol. Impressive." His face becomes stone; my shame starts to creep, then Errol breaks into a smile. "Yeah, but as for you, bruv, fucking insane."

Starred Up is in cinemas from 21 March