GAF Corp., locked in a proxy battle with a dissident shareholder over control of the company, said yesterday it had received a proposal to sell its troubled building materials division to a private Colorado-based company for more than $140 million in cash and securities.

It was not immediately clear how the proposed sale would affect the outcome of the proxy contest being mounted by Samuel J. Heyman, a Connecticut real estate developer who controls about 6 percent of GAF.

Heyman said he had no immediate comment.

In making the announcement, GAF stressed that it was only a proposal subject to the framing of definitive agreements for the sale, which the company hopes to complete by July. "There can be no assurance that the transaction will ultimately be consummated," the company said. However, GAF's board has recommended to management that the proposal be accepted if certain conditions are met, and GAF has agreed not to negotiate with other potential buyers for 90 days while details of the agreement are being hashed out.

GAF's building materials division, which primarily produces roofing materials, had sales last year of $328.8 million, slightly more than half GAF's total revenues of $623.2 million. But the division's recession-induced losses of $26.3 million on the year reduced the company's total income to $56.2 million in 1982.

Sale of the building materials operation would leave GAF primarily centered around its specialty chemical business, continuing a whittling down of the company's assets that has been going on for several years. In 1977, the company discontinued its line of photographic supplies, and three years ago announced a restructuring that cut away another $390 million in assets, including lines of floor-coverings and photographic and reprographic equipment.

The company's shrinkage, and its lackluster results in recent years are among the things Heyman is citing in his challenge of GAF management. One of Heyman's main complaints has been GAF management's year-long attempts to sell the roofing materials division; Heyman's plan is to sell the company's chemical division and rebuild GAF around the building materials operation as that business recovers in the improving economy. Analysts differ as to the merits of the two plans.

GAF stockholders will be asked to vote proxies at the company's annual meeting April 28 to either retain the current board of directors, including Chairman Jesse Werner, or to install a slate backed by Heyman. Analysts say it is difficult to predict a winner in the fight, although management usually has a built-in edge in proxy battles.

GAF shareholders will not have to vote to approve the proposed sale of the roofing business, a GAF spokesman said.

Under the proposal for sale of the building-materials division, the business would be taken over by a new company to be formed by Southwestern General Corp., a closely held, Evergreen, Colo.-based company with interests in building components and construction operations, food-packaging and distribution and automobile aftermarket parts. Southwestern General does not make its sales or other indicators of its size public.

The proposed transaction would be structured as a leveraged buyout, under which money borrowed by Southwestern General to pay for the acquisition would be secured by the assets of the GAF building materials division.

The total value of the complicated transaction is hard to reckon, and GAF advisers indicated yesterday that the total value may not be known until the deal is closed because of changing valuations of securities to be included in the deal. But the company indicated that the final price could be a bit less than the division's current book value of $168.7 million. The company said any difference between the book value and the final price would have to be charged against GAF earnings once the sale is completed.

Under the preliminary terms of the proposal, GAF would receive $100 million in cash for the division, plus a note with a principal amount of about $40.5 million secured by a lien on the assets of the division.

In addition, GAF would receive 20 percent of the stock in the new corporation, which would be redeemed over the next five years. GAF said the value of this stock has yet to be determined.

"By retaining stock in the new Southwestern General building materials entity, GAF will continue to share in the potential growth of the building materials business," the company said in a statement from its New York headquarters.

GAF said Southwestern General intended to operate the building materials business, which has 2,500 employes at plants in 20 states, including Maryland (Baltimore and Beltsville) and Virginia (Springfield, Richmond and Norfolk).