* Greece talks suffer setback after IMF quits
* Consumer confidence surges in June
* Next week's Fed policy meeting eyed
* Wingstop soars in IPO debut
* Twitter rises after CEO quits abruptly
* Indexes down: Dow 0.8 pct, S&P 0.7 pct, Nasdaq 0.5 pct (Updates to early afternoon)
By Tanya Agrawal
June 12 (Reuters) - U.S. stocks erased most of their gains for the week as investors stayed on the sidelines ahead of a Federal Reserve policy meeting next week and as Greek debt talks hit a stalemate.
The S&P 500 was set to end unchanged for the week, while the Nasdaq Composite was on track to close down for the third straight week.
The Dow Jones Industrial Average was modestly higher for the week, after posting declines for two weeks in a row.
A day after the International Monetary Fund quit bailout talks with Greece, EU officials said they had held their first formal discussions on the worst-case scenario for the country.
Investors were edgy ahead of the Fed's Open Market Committee meeting next week - the central bank's last meeting before September - which they hope will provide clues on the timing of an interest rate hike.
An increase in rates will tighten the flow of easy money, which has driven stocks and bond prices to record highs, and raise borrowing costs for companies.
Economists and top Wall Street banks expect the Fed to raise rates in September, in what could be the central bank's first hike in almost a decade.
"We've been at the zero interest rate policy, which is the right policy during a crisis, but we're not in a time of crisis," said Tom Digenan, head of U.S. equities, UBS Global Asset Management.
"It's good for the longer-term economy to get the rate up so that you do have some bullets in the barrel when you need it."
At 12:39 p.m. ET (1639 GMT), the Dow Jones industrial average was down 144.7 points, or 0.8 percent, at 17,894.67, the S&P 500 was down 14.05 points, or 0.67 percent, at 2,094.81 and the Nasdaq Composite was down 27.50 points, or 0.54 percent, at 5,055.01.
Apple's 0.8 percent decline was the biggest drag on Nasdaq and the S&P 500. The Dow was weighed down by IBM's 1 decline.
All the 10 major S&P 500 sectors were lower, with the energy index leading the declines as oil prices fell for the second day in a row.
U.S. consumer confidence surged in early June. The upbeat report capped a week of strong economic data and was the latest indication that growth was regaining momentum after a sluggish start to the second quarter.
Twitter Inc's shares rose as much as 4 percent to $37.25, a day after Chief Executive Officer Dick Costolo abruptly announced he was stepping down.
Wingstop share soared as much as 68.3 percent to $31.99 in its IPO debut valuing the chicken wing restaurant chain at $914 million.
Declining issues outnumbered advancers on the NYSE by 1,881 to 1,057. On the Nasdaq, 1,531 issues fell and 1,115 rose.
Five stocks on the S&P 500 index hit a 52-week high and eight a 52-week low. The Nasdaq recorded 57 new highs and 23 new lows. (Reporting by Tanya Agrawal; Editing by Saumyadeb Chakrabarty)