WASHINGTON — Dennis B. Ross, a seasoned diplomat who has been one of President Obama’s most influential advisers on Iran and the Middle East, announced Thursday that he would leave the White House, at a time when Israeli-Palestinian peace talks are frozen and tensions over Iran are flaring up anew.

Mr. Ross, who disclosed his departure at a lunch with Jewish leaders, said he promised his wife that he would leave the government after two years. He joined the State Department in February 2009 as a senior adviser on Iran before moving to the National Security Council that June.

“Even by Middle Eastern terms, when you say two years and you’re heading into four, that’s a stretch,” Mr. Ross said in an interview.

His resignation, six months after that of Mr. Obama’s special envoy, George J. Mitchell, leaves the White House with a much-diminished bench on the Middle East, symbolizing how much the peace process has faded since the president proclaimed it would be one of his chief foreign policy goals.