Some people are willing to put up with almost anything to become a federal judge, as last week's Senate confirmation hearings for four Virginia nominees clearly showed.

For Richmond Circuit Court Judge James E. Sheffield, 48, the appointment would mean exposing some skeletons in his financial closet. Sheffield, the first black nominated to the federal bench in Virgnia, seems ready to open the closet door.

For state Sen. J. Harry Michael Jr., 61, the appointment would mean resigning from several private clubs the Senate Judiciary Committee considers "invidiously discriminatory." Michael, a Charlottesville attorney, says he is happy to oblige.

Hearings on the Sheffield nomination have been delayed while Sheffield takes a look at a secret Internal Revenue file that already has been shown to the Judiciary Committee. Sheffield has been the subject of three separate criminal investigations into suspected tax law violations. None resulted in prosecution, and the Justice Department has recommended Sheffield's appointment despite his financial problems.

Virginia will fill four new federal judgeships this year. Two nominations, those of attorneys James P. Jones of Abingdon and Richard L. Williams of Richmond, are expected to move easily through the Senate.

Michael also is expected to encounter few problems, particularly since he last week assured two members of the Senate Judiciary Committee that he would resign from any clubs the committee believes are discriminatory.

Michael was advised that the U.S. attorney general and the Judiciary Committee have a policy against membership in discriminatory clubs.

"They're telling him, 'Go and sin no more,'" said one congressional aide.

Michael belongs to an all-white country club in Charlottesville, although in a telephone interview he refused to name any organizations he has joined that are under the scrutiny of committee investigators.

"They felt there were some I belonged to that were what they called "invidiously discriminatory,'" he said.

In Virginia, where membership in exclusive, all-white or all-male clubs often is regarded as a mark of professional distinction, many of those who wield power in the state bristle at the federal policy on such clubs, regarding it as an unwarranted intrusion into their private lives.

Not Michael, The allure, prestige and pay ($54,500) of a federal judgeship more than offset the irritation of having his club memberships screened by the government.

"Club memberships are no high priority with me. They were useful in terms of running for office -- you get to know large groups -- but if I'm on the federal bench . . ." he said, his voice trailing off.

Sheffield, too, is prepared for a through public scrutiny of his private life. He is about to have what one senator has called "serious allegations" aired in one of the most public of public forums.

Yet no one seems ready to forgive Sheffield's past transgressions if like Michael, he promises to "sin no more." One committee member, Sen. Orrin G. Hatch (R-Utah) is very interested in Sheffield's past and is ready to ask a lot of questions about it. But Hatch did not have a single question last week about Harry Michael's club affiliations. Hatch did not even bother to stay in the hearing room when Michael testified about them.

The flap over Sheffield's taxes has temporarily obscured another major obstacle to his confirmation: Harry F. Byrd Jr.

Virginia's senior senator is opposing Sheffield because he was not named on a list of 10 white male candidates Byrd submitted to President Carter. The list was compiled by two advisory panels Byrd appointed -- at Carter's request -- to help pick candidates by their merits rather than political patronage.

The Carter-Byrd showdown has been brewing for a year, ever since the White House let it be known it was determined to appoint a black to the federal bench in Virginia. Two other nominees -- Jones and Williams -- have been waiting a year and a half for their confirmations, which were held up pending the outcome of the Sheffield controversy.

The delays, including Sheffield's own postponement of his hearings, could backfire. Some Republicans are said to be planning further stalling measures in hopes that a victorious Ronald Reagan can make his own court appointments.

All four Virginia nominees have been rated qualified or well-qualified by the American Bar Association. The Federation of Women Lawyers' Judicial Screening Panel -- which examined nominees on the basis of demonstrated commitment to equal justice -- said Sheffield had made "a significant" contribution to equal justice. Michael, by contrast, was found by the group to have taken "no significant action" to demonstrate such a commitment.The screening panel rated the other two nominees "adequate."

The issue of commitment to equal justice and civil rights is an important one -- at least to the groups pushing Sheffield's nomination.

According to the American Civil Liberties Union, which studied the work of the Byrd-appointed screening panels, "The methods the commissions used simply continued the tradition of selecting white, male nominees with similar backgrounds."

Although each panel included a black member, the ACLU said the commissions did not consider a broad spectrum of candidates in order to remedy " the inadequate representation of blacks and women on the federal bench in the South."

Although Sheffield is the only sitting judge among the four nominees, the Byrd panel declined to interview him, the ACLU found.

So there are a lot of questions to be asked about Virginia's nominations, and they should not all focus on Sheffield and his private financial problems, regardless of how serious they may be.

Northern Virginia Rep. Herbert E. Harris II, a Democrat from the 8th Congressional District, says the Senate should hurry to confirm all four nominations. The court backlog and the expanding federal caseload, Harris says, has put a crushing burden on present federal judges.

Indeed, Harris talked so forbiddingly last week of how judges are taking on 300 to 600 to 1,000 cases a year that Sen. Joseph R. Biden Jr. (D-Del.) jokingly asked him to stop trying to frighten off the nominees. j

But neither the workload nor long sessions on the bench nor, it seems, intense personal scrutiny will deter those who want to be federal judges.

For Michael, the job carries the kind of prestige no exclusive country club can match.

For Sheffield, the chance to become the first black on Virginia's federal bench is a crusade no federal investigation or embarrassing disclosure can diminish.