Nick Clegg has called on party members to rally behind whoever succeeds him as leader of the Liberal Democrats, in an impromptu speech given in a Westminster pub.

Speaking in public for the first time since his resignation as party leader a day after the general election, in which the Lib Dems lost 48 of their 56 MPs, Clegg said his successor deserved the party’s “undivided unity and support”.

“People will have opinions this way and that, but it’s incredibly important once that [leadership] election is complete that we really do come together – while Labour continues to tear themselves apart over the summer – and we can immediately hit the ground running after the summer break as a united party,” he said.

The former deputy prime minister was an unexpected attendee at the event organised by six of the 13,209 people who have joined the party since the election. The gathering at the Walkers of Whitehall pub in central London on Monday night, which was organised on Twitter using the hashtag #libdempint, was attended by about 100 new Lib Dem members.

Stuart Lambert (@stuartmlambert) Yes that is @nick_clegg who has turned up unannounced to our #libdempint event tonight! Proud! #libdemfightback pic.twitter.com/afSApVEGb6

The party says its membership has experienced the fastest rate of growth in its history, pushing its overall membership to 58,083, which is still behind the Greens, SNP, Labour and the Conservatives.

More than half of the new Lib Dem members are under 35; the oldest is 91. The majority (82%) have never been a member of the party; 72% have never previously been involved in any sort of campaign.

Clegg urged the audience, which included Lib Dem MPs Tom Brake and Tim Farron, to “stick with” the party. “All I would say to you is, whatever your views are about the events of the last few years, never ever ever let anyone question the motives of the Liberal Democrats,” he said.

“Whatever we got right, and we got a lot right, and whatever we got wrong, and, yes, we got some things wrong, the motives of the party were always exactly the kind of motives I always want in any party of which I am a member.”

Sarah Taylor (@saturngirl) We have two surprise guests #libdempint @timfarron @nick_clegg pic.twitter.com/YEpz1VPsWX

Peter Sigrist, who runs a schools business, joined the party along with five other friends last weekend and organised Monday night’s event on Twitter.

He said he had never voted for the Liberal Democrats, instead switching between Labour and the Conservatives, but was persuaded by the “massive shock” of the general election results to join the party.

“I felt that British politics was going to be the worse for not having the Liberal Democrats in it,” he said, adding that many new members thought the party had a positive record in government and should stick firmly to the centre ground.

The Lib Dem leadership election is expected to be a head-to-head battle between Farron, MP for Westmorland and Lonsdale and former party president, and Norman Lamb, MP for North Norfolk and a former care minister.

To get on the ballot, a candidate must have the endorsement of 200 members from 20 local party organisations as well as 10% of the parliamentary party, which amounts to needing the support of less than one of the eight remaining Lib Dem MPs. The members will cast their ballots under an alternative vote system and the winner will be announced on 16 July.