The president of the European Commission has said Britain will be treated like a “third country” after Brexit and the divorce will be so bad for the UK it will deter all other states from leaving the bloc.