The Liberal Democrat MP made the statement as he gave evidence for a second day at a special Election Court sitting in Edinburgh.
During the hearing, he also admitted he tried to mislead a Cabinet Office probe into the leak.
But the Orkney and Shetland MP denied lying about his role in the release of the document to protect his reputation. Four of Mr Carmichael’s constituents are behind a court bid to oust him from his seat - brought under Section 106 of the Representation of the People Act 1983, which forbids people from making false statements about the character and conduct of an election candidate.
It comes after he admitted responsibility for the leaked memo written by a civil servant, which incorrectly claimed that First Minister Nicola Sturgeon told the French ambassador that she would prefer to see David Cameron remain in Downing Street at May’s general election.
The MP initially denied having prior knowledge of the memo leak, but following a Cabinet Office inquiry he later admitted that he had allowed his special adviser Euan Roddin to release details of the document, which appeared in the Daily Telegraph towards the start of the general election campaign on April 3.
Questioned by his own counsel Roddy Dunlop QC, Mr Carmichael, a married father-of-two, told the court it has been “a difficult few months” for him.
“Do you regret getting involved in this in the first place?” asked the lawyer.
“Enormously,” Mr Carmichael replied.
The court later heard from political expert Professor John Curtice, of Strathclyde University.
Asked whether the trustworthiness of a candidate can be a factor in elections, he replied: “Undoubtedly one of the things voters will take into account is the extent to which they can trust the candidate in question.”
The legal challenge is the first election petition brought in Scotland for 50 years.
Earlier, the court heard Mr Carmichael’s claim in an April Channel 4 interview that he had no prior knowledge of the leak was “false”.
Mr Carmichael told Jonathan Mitchell QC, acting for the four petitioners, that he had initially denied knowledge of the leak to protect Mr Roddin and the interests of his party.
The hearing before Lady Paton and Lord Matthews continues today.