He was a corporate executive of a small Connecticut company. His wife was seeing a psychiatrist in New Canaan, Conn.

The executive met with the psychiatrist, too, to help in his wife's treatment. And sometimes, he and the psychiatrist discussed events at his company that might trouble his wife.

One of those discussions resulted in an illegal $26,933.74 stock windfall for the psychiatrist, the Securities and Exchange Commission charged yesterday in an insider-trading complaint. According to the SEC, the executive was particularly worried about his wife's reaction to the news that the company was about to be sold to a larger firm.

Before the deal could occur, the wife had to agree to sell her shares of stock in the company. Although the deal would double the value of the company's shares, the wife -- along with top officials and their family members -- would receive a slightly lower price than that, according to the terms of the deal.

Enter the psychiatrist. The SEC charged that the executive disclosed the pending deal to the psychiatrist to get his help in breaking the news to the wife and persuading her to sell her stock. Apparently, the persuasion succeeded. But while the wife was selling, the psychiatrist was buying, the SEC charged in a civil complaint released yesterday.

Dr. Morgan F. Moore of New Canaan, the psychiatrist, allegedly learned the exact price terms of the deal, and took advantage of the information to buy 9,000 shares of stock in the company, Posi-Seal International Inc., during the first two weeks of September 1984, before the deal was publicly announced, the SEC said. He paid between $4 and $6.13 a share, for a total cost of $43,452.51, the SEC said.

On Oct. 1, 1984, Posi-Seal announced its agreement to sell to Fisher Controls Inc., a wholly owned subsidiary of Monsanto Co., for $8 a share. Over the following four months, Moore sold his Posi-Seal stock for $7.63 and $8 a share, making the $26,933.74 profit.

"At the times Moore purchased Posi-Seal common stock, Moore knew, or had reason to know, or acted in reckless disregard of the fact, that the information he received from the Posi-Seal official was material and nonpublic," the SEC said in charging Moore with illegal insider trading.

Yesterday, the SEC and Moore announced a settlement in which Moore agreed to surrender the profit on his Posi-Seal trading to the Treasury, plus an equal amount as a penalty, without admitting or denying the allegations.

An attorney for Moore said the doctor "vigorously disputes the government's allegation, particularly as to the source of the information. His decision to settle was based largely on his desire to protect the patient from the need to testify or become otherwise involved." The SEC did not name the executive and spouse.