Thomas P. O'Neill III, lieutenant governor of Massachusetts, is on the verge of deciding to run for the Democratic Senate nomination to oppose Republican Edward W. Brooke, the only black in the Senate.

The move would put him in the embarrassing position of running against a Democratic candidate whom both he and his father, House Speaker Thomas P. (Tip) O'Neill Jr., have already endorsed.

The young O'Neill, who earlier had decided against challenging Brooke, has been an outspoken supporter of Elaine Noble, the only avowed lesbian state legislator in the country, for the nomination. And as late as April 22, the House Speaker appeared at a Noble rally where he was quoted as saying: "She'll make a tremendous senator; if she is the nominee I'll support her."

Since that time, the lieutenant governor has decided that Brooke, the only major Republican office-holder in the state, is vulnerable. On Tuesday, he quietly told Gov. Michael, Dukakis, Noble and other key Democrats that he had all but made up his mind to enter the race, according to various sources.

Noble, expressing shock, said yesterday she plans to stay in the race. "We're thinking it might be difficult for Tommy to run against someone he has already openly endorsed in writing," said her campaign manager, Sandra Fareri.

"We didn't get into the race without talking to Tommy," she added. "We took him at his word."

The younger O'Neill was in New York yesterday and couldn't be reached for comment. "He's taking his time to think it over. It's a personal decision," press secretary Peter Broer said. "What he is feeling now is the call of the party - the call to battle, if you will."

He is expected to announce his decision early next week.

O'Neill, 33, would become the immediate frontrunner in the Sept. 19 Democratic primary should he enter the race. Neither Noble nor the other two announced candidates - state Rep. Michael J. Connolly and Brandeis professor Ruth Morganthau - has ever run a statewide race.

Brooke, a liberal Republican, has easily won his last two elections, collecting more than 60 percent of the vote each time. The absence of any major Democratic challenge had created the impression until this week that he was virtually assured of a third term.

He faces token opposition in the Republican primary from Avi Nelson, an outspoken arch-conservative broadcaster and critic of school busing.

Brooke has recently gone through a highly publicized divorce from his Italian-born wife, and several polls have found some slippage in his popularity.