President Reagan, reacting to the Senate's likely refusal to confirm two directors of the Legal Services Corp., yesterday withdrew all eight pending nominations to the board of the embattled program of free legal assistance to the poor.

The two controversial nominees, law professor William F. Harvey of Indianapolis, who has become a spokesman for efforts to limit affirmative action and court-ordered busing, and William J. Olson, a former officer of Young Americans for Freedom and the National Conservative Political Action Committee, faced major opposition in the Senate.

Sources at Legal Services said the president, who has twice unsuccessfully asked Congress to eliminate funding for the program, was displeased that the other six nominees had not gone far enough in limiting the activities of lawyers who work for the corporation.

Even though all the board members were conservatives appointed by the president, sources said he did not want to leave the six in control without Harvey and Olson.

The withdrawals of the nominations came at a time when the recession and Reagan's economic policies have created more Legal Services clients than ever before. The board, which has been operating for nearly a year without Senate confirmation, has become a target for groups that oppose the program and object particularly to what they see as "social engineering" by lawyers who are frequently young and liberal.

White House deputy press secretary Larry Speakes conceded yesterday that the decision to withdraw the nominations was prompted, in part, by the Senate's likely rejection of Harvey and Olson. But he said the principal cause was that Reagan felt the other nominees did not share his views on Legal Services.

"The president has had the opportunity to observe these nominees in a recess appointment capacity over the last year," said Speakes. "It is his decision that he withdraw them. He will submit names that he feels are more philosophically in tune with his policies." He would not elaborate on those policies.

A group of nominees led by attorney Howard H. Dana, a conservative who headed Reagan's 1980 campaign in Maine, has argued that whatever their personal philosophies, the board members are required to carry out the Legal Services Act and keep the program running. He said yesterday he was disappointed that his nomination had been withdrawn.

Harvey, the chairman of the board, has sought to restrict the activities of Legal Services lawyers. Backed by Olson, he recently proposed a change in regulations to virtually eliminate Legal Services involvement in class-action suits.

Even though the nominations have been withdrawn, the proposal will come up for action at a meeting of the board Dec. 16.

Most of the nominees have served all year as "recess appointees," an unusual procedure by which appointments are made while Congress is out of session and are not subject to Senate confirmation. The names were formally submitted to the Senate only after Reagan was accused of trying to avoid the confirmation process.

Since the recess appointments are valid until Congress adjourns for the year, probably on Dec. 17, the board can vote on the Harvey's recommendations until then.

The remaining three positions on the 11-member board are also being held by recess appointees.

California lawyer George Paras was also originally formally nominated, but his nomination was held up because of controversy over a letter in which he accused Cruz Reynoso, the first Hispanic judge nominated to the California Supreme Court, of being a "professional Mexican."

The other two recess appointees are Frank Donatelli, an ex-official of Young Americans for Freedom and the National Conservative Political Action Committee, and 23-year-old Dan Rathbun, an undergraduate at Christendom College, a 95-student religious school in Front Royal, Va.

Because Rathbun and Donatelli were appointed so recently, their recess appointments would carry them into next year's congressional session, leaving them as the only two board members when Congress adjourns next week.

Other persons originally nominated by Reagan include: Harold R. DeMoss Jr., a Houston lawyer; William L. Earl, a Miami lawyer; Robert S. Stubbs, executive assistant attorney general for the state of Georgia; Annie L. Slaughter, director of operations of the Annie Malone Children's Home in St. Louis, and Clarence V. McKee, a Washington lawyer.