The UK’s closest diplomatic allies have “checked the UK into the Priory” recovery clinic, according to a scathing assessment of the declining influence of the UK Foreign Office.

In a damning assessment in Prospect magazine, diplomats speaking on and off the record said the Foreign Office had been left disoriented and demoralised by Brexit and the successive establishment of rival departments including the Department for International Development, the trade department and the Brexit department.

The UK permanent secretary, Sir Simon McDonald, hit back in a rare public defence, denying he was a “stick in the mud traditionalist”. He said the story of the Foreign Office’s declining influence inside Whitehall had been recycled since the 19th century.

In the article, Tom Fletcher, the former UK ambassador to Lebanon and an occasional adviser to the Foreign Office, said “there is a risk that the rest of the world will discount Britain until we have settled our issues with Europe. Sadly some of our key allies have checked us into the Priory. They hope that we will come out renewed and reinvigorated as an international force. But they are not counting on it”.

Lord Ricketts, a former Foreign Office permanent secretary, said the Foreign Office had not been able to withstand the changes or spending cuts, and that “its limbs had been amputated”. Separating the Foreign Office from policymaking on the EU is not efficient, he said.

Ricketts also bemoans the lack of debate in the UK about foreign policy options post Brexit.

Sir Simon Fraser, the Foreign Office permanent secretary until 2015 and a critic of Brexit, says the department has been unable to fight its corner. “Institutionally, the Foreign Office is a bit timid. One of the difficulties of being a diplomat is you tend to be diplomatic and actually government is a brutal world,” he said.

Fraser said Britain should become comfortable with being a middling power. “Our voice among those who lean towards a rules-based order can still be powerful,” enabling us to “reacquire some ... agency and sense of purpose,” he said.

A succession of anonymous ambassadors are quoted in the article as saying the Foreign Office is “exhausted”, in a “malaise” or suffering a crisis of confidence. They pin the blame largely on the former foreign secretary Boris Johnson and his lack of interest in foreign policy, as opposed to the politics surrounding Brexit.

Robin Niblett, the head of the British foreign policy thinktank Chatham House, also trains his criticism on Johnson, saying he played “with the populism that took Europe to its darkest period. Most European leaders can’t help but be frightened by the naked appeal to nationalism”.

What Britain says and does legitimises what others do, he citing Italy’s interior minister, Matteo Salvini, and the Hungarian prime minister, Victor Orbán.

He argues the UK will need to ease its way back to cooperating with Europe, and questions the value of the slogan “Global Britain”, a phrase still supported by Theresa May but that has been voiced less frequently so far by Johnson’s successor, Jeremy Hunt.

McDonald hits back at claims he has not adjusted to the emergence of new Whitehall departments, but reveals little enthusiasm for the creation of the separate department for trade. Asked if the change is a good thing, he simply replies: “It is a thing.”

“The Foreign Office remains the key foreign policy player. We have one overseas network and the Foreign office runs that network,” he said. “You have a British mission and there is a Foreign Office person in charge of that mission, directing, supervising the overall British effort.”

He accepted policymaking in London has become more divided, but said that was also true for domestic policy. “In the 19th century the Treasury was running everything and now departments have emerged dealing with different aspects of domestic policy. The same has happened with foreign policy. That is an explicable phenomenon,” he said.