Boris Johnson said Britain’s continued membership of the EU would be a “boon for the world and for Europe” in an unpublished newspaper column in which he wrestles with his decision to back or oppose Brexit.

The foreign secretary has since insisted the column was intended merely as a tool for his own thought process, calling it “semi-parodic” in tone.

In a Telegraph article, written days before a published version in which he backed leaving, Johnson wrote of the EU: “This is a market on our doorstep, ready for further exploitation by British firms. The membership fee seems rather small for all that access. Why are we so determined to turn our back on it?”

“Everybody was trying to make up their minds about whether or not to leave the European Union and it is perfectly true that back in February I was wrestling with it, like I think a lot of people in this country, and I wrote a long piece which came down overwhelmingly in favour of leaving,” he told Sky News.

“I then thought I better see if I can make the alternative case for myself so I then wrote a sort of semi-parodic article in the opposite sense, which has mysteriously found its way into the paper this morning because I think I might have sent it to a friend.

“But I set them side by side and it was blindingly obvious what the right thing to do was, and I think the people made the right decision, they voted very substantially to leave the European Union, that is what we’re going to do and we’re going to make a great success of it.”

The published column, which appeared in the Sunday Times, is highly critical of the EU as an institution and the renegotiation deal sought by David Cameron. “We are being outvoted ever more frequently,” Johnson wrote. “The ratchet of integration clicks remorselessly forward.

“There is going to be more and more of this stuff; and I can see why people might just think, to hell with it. I want out. I want to take back control of our democracy and our country. If you feel that, I perfectly understand – because half the time I have been feeling that myself. And then the other half of the time, I have been thinking: hmmm. I like the sound of freedom; I like the sound of restoring democracy. But what are the downsides – and here we must be honest.”

The existence of the article, in which he also warned that Brexit would cause an “economic shock” and could lead to the breakup of the United Kingdom, was revealed in the book All Out War: the Full Story of How Brexit Sank Britain’s Political Class, by the newspaper’s Sunday Times’s political editor, Tim Shipman.

“There is the worry about Scotland, and the possibility that an English-only “leave” vote could lead to the break-up of the union,” Johnson wrote. “There is the Putin factor: we don’t want to do anything to encourage more shirtless swaggering from the Russian leader, not in the Middle East, not anywhere.”

The book also claims Johnson “wanted to punch” his Brexit ally Michael Gove after the former justice secretary announced his own bid to become prime minister on the morning of a speech in which Johnson was to announce his own candidacy, a move that ended up destroying both men’s chances and paving the way for Theresa May to enter No 10.

The book also claims Sir Lynton Crosby told Johnson to support Brexit once Cameron had ignored the election strategist’s advice to delay the referendum.

Among the other revelations, the remain campaign’s digital specialist, Jim Messina, apparently described Cameron pollster Andrew Cooper as “the worst I’ve ever worked with” for getting wrong his forecasts about the vote.

Lucy Thomas, former deputy director of the Stronger In campaign, said the unpublished column demonstrated how much of Johnson’s decision to back leaving the EU was about his political career.

“None of it is about the detail, none of it is about what life outside the EU looks like, there was no thinking about prices going up or what would happen to jobs. It is purely, ‘Was the renegotiation enough? is the status quo the right thing?’” she said.