Coalition government colleagues have warmly praised David Laws after he quit as Chief Secretary to the Treasury.
The Liberal Democrat MP said he could not carry on with "crucial work" on the Budget after admitting he claimed expenses to pay rent to his partner.
PM David Cameron and his deputy Nick Clegg paid tribute to him, saying they hoped he would return to government.
But former MP Martin Bell said expenses claims had to be "squeaky clean" or "you'll be punished".
Former Liberal leader Lord Steel said Mr Laws' resignation had "cost the new government an able minister".
Mr Laws had earlier apologised over the revelations in the Daily Telegraph, and said he would pay back the £40,000 he had claimed.
According to the newspaper, between 2004 and 2007, Mr Laws claimed between £700 and £950 a month to sub-let a room in a flat in Kennington, south London, from his secret long-term partner, lobbyist James Lundie.
Since 2006, Parliamentary rules have banned MPs from "leasing accommodation from a partner".
The Yeovil MP said he had wanted to keep his relationship with James Lundie private.
He also queried whether Mr Lundie counted as a "partner" as defined by the rules on expenses.
He has now referred himself to the parliamentary standards commissioner.
The prime minister wrote in response to Mr Laws' resignation: "The last 24 hours must have been extraordinarily difficult and painful for you.
"You are a good and honourable man. I am sure that, throughout, you have been motivated by wanting to protect your privacy rather than anything else.
"In your short time at the Treasury, you have made a real difference, setting the government on the right path to tackle the deficit which poses such a risk to our economy."
Mr Clegg said he had always admired his fellow Liberal Democrat's integrity.
The Lib Dem leader said: "I very much hope that when those questions are answered there will be an opportunity for him to rejoin the government because, as everyone has seen in recent weeks, he has so much to contribute to national life.
"When all is said and done, this has come about because of David's intense desire to keep his own private life private. His privacy has now been cruelly shattered."
Chancellor George Osborne said he was "very sorry" to lose Mr Laws from the Treasury.
"It was as if he had been put on earth to do the job that was asked of him," he said.
"I spoke to David several times over the last 24 hours and I have a huge admiration for the way he has conducted himself in the most difficult circumstances."
But Labour MP Stephen Pound said Mr Law's explanation that he wanted to keep his personal life private made no sense.
Mr Pound told the BBC: "You don't pay money to someone you're in a close relationship with and expect the state to dip into its purse to pay it for you.
"I find today it very difficult to be overly sympathetic to someone who is a multi-millionaire yet someone who allowed his greed to overcome his good sense."
But Lord Steel said: "His mistake did not cost the taxpayer a penny since he could have been paying to rent a room elsewhere.
"Therefore his resignation seems to be an over-the-top reaction to newspaper stories and has cost the new government an able minister."
However, former independent MP Martin Bell said Mr Laws had not been unfairly treated.
Mr Bell told the BBC: "I don't think it's a witch hunt, if you go into public life you expect public scrutiny.
"This has got nothing to do with his personal relations with whoever, it has to do with expenses, and this has been going on for a few years and you have to make sure that whatever you claim is squeaky clean and if you don't you'll be punished."
Meanwhile Matthew Todd, editor of the gay magazine Attitude, said it was unfortunate that Mr Laws felt he had had to hide his sexuality in the first place.
Mr Todd told the BBC: "I think the overriding thing, that I think probably a lot of gay people will feel, is that it's just very sad in this day and age - it's 2010 and he's in the party which is quite arguably the most pro-gay party out of the main three - that he felt that he had to hide his sexuality."
Mr Laws' resignation is the first to hit the coalition government, just three weeks after it was formed.
He was one of the Liberal Democrat negotiators who hammered out the deal before joining the cabinet as a key member of Mr Osborne's Treasury team.
Mr Laws is a former city banker who only entered politics in 2001, but he rapidly rose to prominence and it was him who listed £6.2bn of cuts under the coalition's initial attack on "wasteful spending".
Mr Laws has been replaced as Chief Secretary for the Treasury by former Scottish Secretary Danny Alexander, and Mr Alexander's job has been taken by Lib Dem MP Michael Moore.
Mr Laws said he had informed both Mr Cameron and Mr Clegg about the resignation, but it had been "his decision alone".