An Algerian who entered the UK illegally will be allowed to stay in the country, despite being a terror suspect with alleged links to Osama Bin Laden, because his fight against deportation damaged his “mental health”.