Shortly before he was scheduled to depart for America last week, Prime Minister Menachem Begin told a reporter that he was leaving with a "heavy heart." At that time he faced a confrontation with President Carter over the meaning of U.N. Resolution 242, Israeli settlements in occupied territories and whether Israel should commit itself to withdrawal from the West Bank of the Jordan River.

In the kind of lightning change so typical of the Middle East, Palestinian terrorists subsequently killed 36 people outside Tel Aviv, Begin postponed his trip and Israeli troops invaded southern Lebanon.

Now, a week later, Begin is planning to depart again for America. Only this time the topic of his talks in the White House will not be Israeli withdrawal from the West Bank and Gaza but Israeli withdrawal from Lebanon.

A week ago, Begin faced a crisis of confidence at home not only over his handling of the Egyptian peace initiative but also because of his handling of domestic affairs and his seeming lack of leadership.

Today, the Israeli public is solidly behind him because of their eagerness to have revenge on the Palestinians following last Saturday's attack on the Tel Aviv-Haifa highway.

But the old problems have been pushed aside only temporarily and the new problem of Lebanon has created further difficulties rather than solving anything.

Begin has said that Israeli troops will not withdraw from southern Lebanon unless an arrangement is made to keep the Palestinians out of the area. Since the Israelis and the Palestine Liberation Organization will not talk to each other, and the Syrians are not presently inclined toward making an agreement with Israel, Begin is now faced with the considerable problem of how to get his troops out of Lebanon.

There has been no official reaction yet to the American suggestion that some kind of United Nations force take over the role of restoring order in southern Lebanon. Unofficially, the reaction here is that the United Nations has usually not proved capable of keeping the peace or cracking down on the type of activity that Israel hopes to prevent.

Israelis remember that the U.N. forces in the Sinai withdrew in May of 1967, at Egypt's request - a move that in Israel's view made the 1967 war inevitable. However, the idea of some kind of an international peacekeeping force is one of the issues Begin will discuss with Carter next week.

Although the invasion of Lebanon is undoubtedly popular here, serious thought is now being given to the problem of getting out. These fears were well expressed in an editorial in the newspaper Davar.

"One need not be possessed of a particularly vivid imagination to conjure up the following picture," the paper said. "One day the Israeli army sets up a security fence on the northern line of the security belt in Lebanon to improve the status of ongoing security and to facilitate the blocking of the line. Except for 'open bridges' across the Litani River, the population of southern Lebanon is cut off from the rest of the country. Southern Lebanon is cut off from the rest of the country. Southern Lebanon becomes integrated into the economy of (Israel) and enjoys various services provided by the state of Israel. The security belt gradually becomes, in Israeli consciousness, an integral part of the land of Israel. A commitment develops vis-a-vis the Christian population so that to withdraw would be tantamount to betrayal and abandonment of an ally. In order to prevent terrorist attacks on the security belt and in Israel proper the Israeli defense force begins sending patrols into the region north of the security belt and so on and so on.

"It is easy to lose in Lebanon but very difficult to win. Even if the Americans swallow our presence there we will face a region crawling with terrorists north of the security belt. The threat of rocket fire on Galilee's settlements will be reduced but will not disappear. Certainly the threat of terrorist acts such as that of last Saturday will not disappear."

Although Israel has no intention of moving the border north or building a new security fence, the grim prediction has some base in reality.

Israeli planners have already taken into account that the invasion of southern Lebanon will result in a small war of attrition with Palestinians and Israelis shelling each other in southern Lebanon and in northern Israel as well. Yesterday the first Israeli civilian casualty from the Lebanese invasion was reported when a man was killed in a rocket attack in northern Israel.

Although the Christian militiamen in southern Lebanon can now link up their enclaves that were previously isolated from each other by Palestinian-held positions, they are not strong enough to hold the new six-mile-wide security belt themselves.

The only bright spot in the otherwise dismal picture is that, so far, Israeli and Syrian forces have not come into direct confrontation. But it is hard to imagine that Syria could be prevailed upon to accept Israel's terms to police Palestinian activity now and, as former prime minister Yitzhak Rabin said in an interview with the newspaper Maariv yesterday: "If the government of Israel sticks to its demands and refuses to have a security belt evacuated until there is a guarantee that the terrorists will not attack Israel from there, then we can expect a lengthy stay in the security area."

Israel seems to be putting its hopes on having the United States work something out but, as the Davar editorial said, the Israeli troops who are going into Lebanon "would do well to take along a change of socks."