Last month, setting out his vision for British foreign policy, Nick Clegg told the UN general assembly that Britain would lead by example in upholding freedom and democracy. And the new Labour leader Ed Miliband was equally emphatic in his rejection of the party's 90-day detention policy as being against the British tradition of liberty.

Affirming these same values, dismissing the idea of banning the burqa, immigration minister Damian Green pointed out that a ban would be "rather un-British. We're a tolerant and mutually respectful society."

But the true worth of British values is not found in what our leaders say, but in what they do. The 3,000 immigrants locked up in immigration removal centres across the UK are perhaps a better measure of these values.

One such immigrant, John, a young African man, has been in immigration detention for nearly 12 months. Earlier this year, the UK Border Agency made a cursory attempt to deport him. The authorities in his home country refused to accept him and so he remains, locked in limbo. Prior to his incarceration, John worked illegally, without papers, in a food-packing factory. He worked hard and was promoted to quality control. But with promotion came the stress and misery of living a life of deception that became too much. In the end, he tried to leave Britain with a false passport, seeking a fresh start somewhere more accepting. He was caught, imprisoned for 12 months and then sent to an immigration removal centre where he has remained ever since.

The irony – that John's indefinite, ongoing detention in Britain has only come about because he made the mistake of trying to leave – is not one that escapes him. But this is not something he dwells on. Keeping sane is far more important. When I visit John, he tells me that he is determined not to go mad. "I'm doing well," he insists, unlike a former room-mate who cried every night, or the Iranian man who sits staring at the wall day after day, speaking to no one. "He never smiles, he is so sad." This is the Britain by which the words of our politicians must be judged.

These words contrast starkly with the report of the London Detainee Support Group (LDSG). It is based on the experiences of 167 immigrants detained for a year or more. Nearly half of them come from just four countries: Algeria, Iran, Iraq and Somalia. The barriers to deporting people to these countries mean that many of the detainees were ultimately released, but only after futile years spent in detention.

The dry language of Home Office statistics – "Management information shows that of the 2,775 people detained …" – belies the misery behind the policy. LDSG's report gives some indication. A man who was locked up for 23 months died the day after being released. Two men, one from Somalia and one from Zimbabwe, died of terminal illnesses shortly after their incarceration ended.

Even if the moral argument against indefinite detention does not sway this generation of politicians, perhaps the cost might set alarm bells ringing. According to LDSG's figures (obtained from the Home Office in 2005/06), it costs about £68,000 to keep each detainee locked up Colnbrook removal centre. Across the whole estate, this equates to millions. Add to this the cumulative millions in compensation, highlighted in a Guardian investigation, spent on cases where the Home Office has detained immigrants unlawfully, and the system becomes even harder to justify.

LDSG argues powerfully that if detention must be used at all, it should be only when removal or deportation is imminent. For complex cases, community-based alternatives, as successfully tried out in Sweden, should be used. Others argue that an upper limit of the time someone can be detained should be enforced, as in other European countries.

The official response from the UK Border Agency is that detention is for the shortest possible time to facilitate removal. In theory this is acceptable. But, as LDSG shows, the reality is very different. The three main political parties continuously pledge their commitment to fairness and liberty. Yet today in Britain innocent men, women and children – who have not been charged with a criminal offence, or convicted by a jury of their peers – are denied their liberty, their dignity and ultimately their sanity. Only by ending this practice can politicians truly claim to be upholding British values.