Thousands of mourners filed past the body of Pope Paul VI yesterday as members of the sacred College of Cardinals began gathering here to arrange for the funeral and set into motion the election of the 262d successor to St. Peter.

Vatican Secretary of State Jean Villot took temporary control of the administration of the Holy See, left leaderless by the death Sunday of the 80-year-old pontiff after a heart attack.

As mourners viewed the body of the pope at his summer palace at Castel Gandolfo in the Alban hills south of Rome, St. Peter's Basilica in the Vatican City filled with thousands more worshiping at a Mass for the dead.

It is to St. Peter's that Pope Paul's body wil be moved tomorrow to lie in state until the ancient funeral and burial rites are conducted Saturday . . . Already, heavy chains have been placed across the doors of the Papal Palace in the Vatican and flags and flying at half staff on all Vatican buildings, as they are throughout Rome.

The few cardinals who were not away from Rome on summer holidays rushed to Castel Gandolfo yesterday to pay their respects to the dead pope. Then a small number of them - reportedly a dozen - gathered at the Vatican for 90 minutes to begin making the elaborate funeral arrangements.

Villot and Carlo Cardinal Confalonieri, dean of the college of cardinals, will summon the remainder of the 130 cardinals to the Vatican for the ritual of secretly electing a successor to Pope Paul, who for 15 years led the world's 600 million Roman Catholics.

The conclave of the sacred college - as the cardinals collectively are called - must, according to church law, begin by Aug 26, and the Vatican said it could start as early as Aug. 21.

As cardinal chamberlain of the Roman Catholic Church, as well as secretary of state, Villot, a French cardinal, automotically assumed charge of Vatican affairs in all but spiritual matters and took possession of the papal palaces.

Although the five highest officials of the church remain in office, all Vatican assignments technically lose force upon the death of a prelate, and the secretary of state assumes control.

It will be to Villot to whom the 115 elector cardinals swear secrecy during the election of a new pope. Fifteen cardinals, under a change instituted by Pope Paul in 1-70, are ineligible to vote because they are over 80 years of age.

Villot, the first non-Italian Roman Catholic chamberlain, was at the pope's bedside when he died of heart failure Sunday night about four hours after participating in Holy Mass.

The pope's personal physician, Mario Fontana, yesterday reported that the immediate cause of death was hypertension, failure of the left ventricle of the heart and acute pulmonary edema, or fluid in the lungs.

Until the pope's death, there had been no official indication from the Vatican that he was suffering from anything more serious than acute arthrosis, although he had frequently talked in recent months about "the end of my life approaching."

As condolences from all over world poured into the Vatican, thousands of mourners went to Castel Gandolfo, led by Italian President Sandro Pertini, who is 81, and Prime Minister Giulio Andreotti. Many of the worshippers maintained an all-night vigil, as commenorative masses were held throughout Italy, including the northern Italian town of Concesio, where the pope was born as Giovanni Battista Montini.

Dressed in red vestments, a rosary entwined in his hands, the pope was put on view in a second-floor room of the Papal Palace, resting against cushions on a bed framed by a silver crucifix at one end and a large burning candle at the other. Over the bed was a large bronze cast of the papal coat of arms.

The body was watched by relatives and four Swiss Guards, as mourners waited and prayed in a piazza outside.

Once the pope's body is returned to the Vatican tomorrow, it will be placed, along with coins and medals minted during Paul's 15-year papacy, into three coffins, one placed inside the next. He will then be buried in a vault below St. Peter's high altar.

According to the church's ancient traditions. Villot is to be given the popes' fisherman's ring and seal - the sign of pontifical authority - upon which the boat of Peter and the coat of arms of the reigning pope are engraved. According to custom, the chamberlain then shatters the stone, signifying the end of the dead pope's papacy.

Vice President Mondale is expected to head the U.S. delegation to Pope Paul's funeral, administration officials said yesterday. White House press secretary Jody Powell said the members of the official delegation will be announced today. Officials noted that Lyndon Johnson, then vice president, headed the U.S. delegation to the funeral of Pope John XXIII in 1963.

As a warm rain fell intermittently yesterday there were no more than usual numbers of passersby and tourists in St. Peter's Square, although there were signs of the pope's death everywhere in Rome - lowered flags, newspapers with heavy black headlines, and special masses for the dead in churches throughout the city.

There was also the inevitable speculation on a successor, but no obvious favorite has yet emerged.

Franz Cardinal Koenig of Vienna, who has been mentioned as a possible successor to Pope Paul, said yesterday on Austrian radio that "I personally do not deem myself suitable for this task."

[Koenig, 73, said, "There will have to come a younger pope, a pope who perhaps comes from quite a different tradition, from a different environment."]