Israeli President Chaim Herzog told a joint session of Congress yesterday that his country is "irrevocably committed to the inexorable process moving toward peace in the Middle East."

Herzog's speech to the lawmakers, following a meeting with President Reagan and a luncheon hosted by Secretary of State George P. Shultz, was a high point of the first state visit here by an Israeli president in the 40-year history of the Jewish state.

Welcoming Herzog to the White House with full military honors and a 21-gun salute, Reagan said that despite difficulties, the United States "remains undeterred" in seeking Mideast peace. Shultz, on a visit to the region last month, failed to find a formula that would permit both Israeli Prime Minister Yitzhak Shamir and Jordan's King Hussein to move toward restarting the moribund peace process.

Herzog, telling Congress that "we have never achieved any advance without negotiations" in the search for Mideast peace, said that "the unanimous desire of our people {is} for negotiations." Referring to the split between the two wings of Israel's coalition government, Herzog added, "There may be differences of opinion as to procedures and modalities, but not as to the vital necessity of achieving peace through direct negotiations."

Herzog, who holds a mostly ceremonial post, said that because of U.S. aid, "my small country is capable of defending all that you stand for" in the Middle East. At another point, he said U.S. aid "is extended as a function of the vital interests of the United States."

Herzog's visit came 12 years after the U.N. General Assembly, over Herzog's objections as Israeli ambassador to the world body, adopted its "Zionism is racism" resolution. He noted that both houses of Congress, at the initiative of Sen. Daniel Patrick Moynihan (D-N.Y.), who was U.S. ambassador to the United Nations at the time, recently adopted an Australian initiative calling for revocation of the U.N. action.