* H1 pretax profit 3.9 billion pounds

* Bank buys wealth platform Embark

* Dividend restored as bad loan fears recede

LONDON, July 29 (Reuters) - Lloyds Banking Group swung to a first-half profit on Thursday and announced an interim dividend, boosted by a house buying frenzy and improved economic outlook in Britain.

Lloyds posted pretax profit of 3.9 billion pounds ($5.4 billion) for the six months to June, ahead of the 3.1 billion pound average of analyst forecasts compiled by the bank.

The bank had posted a first-half loss of 602 million pounds the previous year, after setting aside billions to cover potential bad loans due to the COVID-19 pandemic.

Lloyds also announced a 0.67 pence interim dividend, a day after rival Barclays unveiled more than $1 billion worth of shareholder payouts.

The bank confirmed the acquisition of digital savings and retirement group Embark, adding 410,000 customers and 35 billion pounds of assets.

Like rivals, Lloyds is looking to expand in wealth management amid a pandemic-driven savings boom, to make up for squeezed margins from record low Bank of England rates.

The bank released 656 million pounds of its bad loan provisions, after upgrading its economic forecasts following a rapid rollout of COVID-19 vaccines in Britain.

But its results were weighed down by 425 million pounds of "remediation charges", including compensation for historic fraud at its HBOS Reading branch and a previously disclosed fine for misleading insurance customers.

Lending increased by 7.5 billion pounds as the economy began to open up during the period, but was again outstripped by growth in deposits - up 23.7 billion pounds as customers continued to build up savings.

Lloyds is in the midst of a shake-up of its top team after long-standing boss Antonio Horta-Osorio left in April to become chairman of Credit Suisse.

Finance director William Chalmers is running the bank before HSBC veteran Charlie Nunn takes the helm next month. Nunn and chairman Robin Budenberg – who stepped into his role in January – are expected to devise a refreshed strategy for the bank.

($1 = 0.7178 pounds) (Reporting by Iain Withers and Lawrence White Editing by Rachel Armstrong and Mark Potter)