By Bill Berkrot

(Reuters) - Generic drugmaker Mylan NV said on Wednesday it was working to finalize a settlement with the U.S. government over Medicaid rebates for its EpiPen emergency allergy treatment, adding that money set aside for the settlement led to a third quarter loss.

The company had previously said it agreed to terms of a settlement set at $465 million. However the U.S. Justice Department and other agencies have yet to confirm any such agreement.

The dispute involves the classification of EpiPen as a generic rather than a branded product, which led to significantly smaller rebates to state Medicaid programs.

Mylan has been under investigation and faced harsh criticism over steep price increases for its life-saving auto-injector used for severe allergic reactions.

Chief Executive Heather Bresch, on a conference call with analysts, said high deductible health plans and pricing pressure had created U.S. headwinds for its business.

"We wish we had better anticipated the acceleration of rising out-of-pocket costs" for our customers, she said.

With the distraction of the U.S. presidential election over, Bresch said she hoped to be part of a discussion aimed at finding solutions to better transparency around the complexities of drug pricing.

Mylan's announcement earlier this year of a near doubling of the price for a pair of EpiPen injectors to $600 set off a firestorm of criticism from parents, politicians and patient advocates.

The company said it expects EpiPen to account for 6 percent of total sales in 2017.

Mylan has virtually had the market for emergency allergy auto-injectors to itself. However, competition is coming. Last month, privately held Kaleo Inc announced plans for a U.S. relaunch of its Auvi-Q injector in the first half of next year following a product recall.

While Mylan works to integrate recent acquisitions, Bresch said business development plans will focus on smaller bolt-on acquisitions, perhaps to enhance a particular therapeutic area.

"It's buyer's market. I think there's great assets out there," Bresch said. "We don't need to do any big acquisitions."

Mylan posted a net loss of $119.8 million for the third quarter, or 23 cents per share, compared with a profit of $428.6 million, or 83 cents per share, a year ago.

Excluding items, such as the settlement expense, Mylan said it had adjusted earnings of $1.38 per share. Analysts on average expected $1.45, according to Thomson Reuters I/B/E/S.

Mylan stuck with its recently lowered full-year forecast for adjusted earnings of $4.70 to $4.90 per share, and maintained its 2018 earnings projection of $6 per share.

It said it expects to see generic drugs price erosion in the mid-single digits range for the rest of the year.

Revenue for the quarter of $3.06 billion was just short of Wall Street estimates of $3.12 billion.

(Reporting by Bill Berkrot in New York; Editing by Lisa Shumaker and Tom Brown)