For Nancy Reagan, there was a disturbing sense of de'ja vu about it all.

"Oh, God, Don, not again. I hope we don't have to go through the same thing again," a senior White House official quoted her as telling chief of staff Donald Regan after learning that the president would have to undergo intestinal surgery.

The official said Regan "tried to reassure her there is a difference between recovery from something of this nature and a gunshot wound." And while Mrs. Reagan maintained her composure upon getting the news, other sources say that by the time she returned to the White House Friday night she was in tears.

"I think there was a sense of de'ja vu for her, having been at the hospital before [when Reagan was shot in March 1981] and hearing for the first time that your loved one is threatened," James Rosebush, the first lady's chief of staff, said yesterday.

He described Mrs. Reagan as being in an "upbeat" mood when she and the president went to Bethesda Naval Hospital Friday. In fact, Rosebush said, when the president came out of the first procedure that afternoon and saw her, he cracked, "Now what was your name again, sweetie?"

"She had been cheering other people up to then," Rosebush said. "Then when they got the results and learned that surgery was necessary, it was a real shock, totally unexpected. They felt that since he was there and had already started antibiotics, he should go ahead with the second procedure."

Throughout the weekend, the brief glimpses the public had of Mrs. Reagan were of a woman composed but obviously distressed. Behind the scenes, though, she reached out to her children Ron and Patti, her stepson Michael and her stepbrother, Philadelphia neurosurgeon Richard Davis.

Friday night, Rosebush said, she also took calls from the Rev. Billy Graham and Reagan family minister the Rev. Don Moomaw. She did not go to bed until 1 a.m., waiting for the report from a delayed Cat scan.

Saturday morning, Maureen Reagan, heading the U.S. delegation to the U.N. Decade for Women conference in Nairobi, Kenya, called "wanting details and offering her prayers," Rosebush said. She talked to Mrs. Reagan again after Saturday's surgery.

The first lady reached the hospital around 9:15 a.m. Saturday carrying a large canvas bag filled with photographs of the family and the Reagans' California ranch. She and Rosebush placed them on the walls and around the president's blue and white room, including one of her on his nightstand and also a crayon drawing by Rosebush's daughter Claire, 5 1/2, saying "I love you, Mr. President."

"The president had me get him a piece of paper and he wrote her a most beautiful thank-you note," Rosebush said yesterday.

White House spokesman Larry Speakes told a briefing that the pictures were "to make it more comfortable and to lend a more personal air to it."

Throughout Saturday morning, Mrs. Reagan sat nearby as the president had his foreign intelligence briefing, met with Regan on legislation and signed a letter transferring the full powers of the presidency to Vice President Bush during the surgery.

"She said they talked together and that he wanted her to continue things on her schedule," Rosebush said.

Around 11:15 a.m., as Reagan was wheeled to the operating room, Mrs. Reagan walked with him and held his hand. When they reached the anteroom, she leaned over, they kissed and told each other how much they loved one another.

"I'll see you soon," Rosebush quoted Reagan as telling her.

"You bet," she replied.

In the president's room, where she waited out the next 2 hours and 53 minutes, Mrs. Reagan was joined by her stepbrother, whose presence was described by the senior White House official as "very reassuring" and whom Rosebush said had been "a great support."

Rosebush said the first time Mrs. Reagan breathed "a sigh of relief" was when Dr. Steven Rosenberg came in to tell her that the operation had been "the smoothest, most perfect operation he had seen, that they had done the procedure, examined the liver and blood cells and that [the president's] condition was like a man of 40."

Once Reagan was in the recovery room, Mrs. Reagan and her stepbrother were at his bedside. "She said he looked and recognized me at the back of the room, he was that alert," Rosebush said. "They talked and held hands for about 20 minutes."

Yesterday, Mrs. Reagan took more pictures to the president's room, hanging one of the ranch on the wall opposite his bed. She had lunch there and together they watched television. Later, when he was alone, the president read "Jubal Sackett," the latest novel by his favorite author, Louis L'Amour.

Rosebush said Mrs. Reagan plans to stand in for the president, making the welcoming remarks tonight at the White House reception for foreign chiefs of mission in Washington that will include a Boston Pops concert. On Wednesday, she is scheduled to make a two-day visit to the USS America, off the coast of Virginia, to see the Navy's antidrug and alcohol abuse program.

Meanwhile, Rosebush said it is inevitable that there is "still a feeling of anxiety" while the Reagans wait for the results of laboratory tests on the tumor that was removed, scheduled to be completed today.