The public repentance of Marc Lincoln Marks may go unrecorded in the history books. Indeed, hardly anyone was present yesterday to hear the swan song of the three-term Republican from Sharon, Pa.

Despite that, Marks said his piece on the floor of the House as eloquently and as brutally as he could.

"The time has come to stop this massacre!" Marks said in a half-hour speech attacking President Reagan and his economic program.

"The time is now, to call out to thinking women and men everywhere to raise their voices against this murderous mandate . . . . If this president knows at all about what is taking place throughout this land, then he lacks the compassion necessary to be president," he said.

Those were strong words from a Republican about his party's leader and his party's program, for which, he acknowledged yesterday, he had repeatedly voted because of political expediency.

"There has never been any truth to the political adages, 'Go along to get along,' or 'Loyalty to the president at any cost,' " Marks said, adding that " I am as guilty as anyone else of following those slogans too often."

Not a few Republicans have an uneasy feeling these days. GOP leaders are publicly distancing themselves from the president. Reagan's new budget is given little chance of passage on the Hill. Nervous liberals and moderates in the party fear they will pay for their loyalty with defeat in November.

No matter how great the disillusion, however, no one has said it quite like Marks, whose candor may result in part because he is retiring from Congress this year with a back injury.

A few items from the speech, which was attended by only a scattering of tourists in the gallery and fewer than a dozen congressmen:

"The time is now to see . . . that what Washington, Lincoln and Roosevelt accomplished, that is to provide for those who . . . can't provide for themselves, is not destroyed forever by a president and his cronies whose belief in Hooverism has blinded them to the wretchedness and to the suffering they are inflicting . . . on the sick, the poor, the handicapped, the blue-collar and white-collar workers, the small business person, the black community, the community of minorities generally, women of all economic and social backgrounds, those who desperately need job training, families that deserve and desire the right to send their children to college or graduate school--in fact anyone . . . other than those . . . fortunate enough to insulate themselves in a corporate suit of armor."

"In the name of all that is holy, how can you and I read about what is happening . . . and believe we can do nothing . . . . How can we even think of stuffing the defense community with more dollars that they in their wildest dreams, could use, without vomiting money?"

"Are we not concerned that this president has failed to grasp that perception of this administration's 'regal image'? Are we not concerned that the china policy and the secondhand dress business image have tarnished statements made by this president that his administration is one dedicated to helping the people?"

A courtly figure with a shock of white hair, Marks, 55, is known as a loner in Congress, an intelligent man who is somewhat awkward politically, a maverick who has remained aloof from his party. "The speech is more a reflection of Marc than of most moderate Republicans," Rep. Jim Leach (R-Iowa) said.

"There is a staggering series of issues where there is growing concern: the environment, defense, women's issues, social policy. But the moderate wing of the party are institutionalists. They have a desperate desire to be friendly to the president if possible," Leach said.

Now that Marks, a former trial lawyer, is leaving Congress, he seems to relish an almost excruciating candor.

"I've had a very undistinguished career in the six years I've been here," he said. "When I came, I expected I could change the world, and I found out pretty damn quickly I couldn't. As I look back on it, I don't think I left a fingerprint, let alone a thumbprint."

At least, however, he has said what was on his mind. He concluded his speech: "These words are what I truly believe."