TALK about Middle East peacemaking and one towering achievement inevitably comes to mind: Camp David. Though still controversial in Israel and much of the Arab world, the 1979 treaty between Egypt and Israel defused a dangerous rivalry in the Middle East. It remains the model for how a third party like the United States can mediate international disputes.Camp David proved that peace is possible. But Middle East experts say the very factors that made Camp David a success will be largely missing in Madrid. Egyptian President Anwar Sadat's 1977 dramatic visit to Jerusalem broke through years of accumulated fears and suspicions in both countries, providing a permissive public environment for Sadat and Israeli Prime Minister Menachem Begin to negotiate the compromises needed for peace. But Arab and Israeli diplomats will meet in Madrid amid public distrust and skepticism. Mr. Begin was also secure enough politically to weather the domestic storm that followed the announcement that Israel would relinquish the Sinai peninsula, captured from Egypt during the 1967 Arab- Israeli war. Today Israeli Prime Minister Yitzhak Shamir sits atop a fragile coalition threatened by the mere onset of talks. Success at Camp David was also abetted because the Sinai was not freighted with the religious and historical significance attached to the West Bank and Gaza Strip - or the strategic importance of the Golan Heights. And at Camp David, President Carter managed the talks in person. "The President was ... determined not to leave the table until there was an agreement," says one former US diplomat. "I don't see that in the present constellation." Beyond Sinai, the Camp David treaty provided a framework for resolving the Palestinian issue, although it quickly collapsed. The US is proposing a similar plan for discussion in Madrid. Sadat and Begin envisioned five years of self-government for West Bank and Gaza Palestinians, during which negotiations on the final status of the territories would begin. Neither proposal has required an end to Jewish settlement in the territories or set a date for withdrawal of Israeli military forces. Nor do they define Palestinian self-determination, which Israel opposes, as the final goal of the talks. Many Arabs complain that Camp David shattered Arab solidarity without helping the Palestinians. Israelis say the treaty forced them to relinquish tangibles (the Sinai) for intangibles (cool relations with Egypt). Maybe so. But the two nations that fought four wars before Camp David have been at peace ever since.