Two and a half days after the plane carrying their loved ones vanished from radar screens over the Java Sea, the anguished relatives crowded into a room already assumed the worst. But the confirmation came in a particularly brutal way: live television coverage showed a half-naked, bloated body floating in the sea.

Many people began crying hysterically. Several fainted and had to be carried out of the room at Surabaya’s airport, the starting point for the ill-fated AirAsia Indonesia flight QZ8501 that departed early on Sunday morning. “You have to be strong,” said the mayor of Surabaya, Tri Rismaharini, as she comforted relatives. “They are not ours, they belong to God.”

But one woman, dressed in an AirAsia uniform, raged at the TV. “Is it possible for you not to show a picture of the dead?” she shouted. “Please do not show a picture of a dead body.”

A man awaiting news of his younger brother said the relatives had been calm before the broadcast of the grisly images, shot from a search helicopter, showing a body floating face down, clad only in underwear and socks. “But the atmosphere was very different after the footage of a dead body was shown,” said Munif, 50, who in common with many Indonesians uses one name. “Families became hysterical.”

Dwijanto, 60, awaiting news of his son, told the AFP news agency that the images extinguished any hope for him. “My heart will be totally crushed if it’s true. I will lose a son,” he said.

The channel involved, Indonesia’s TVOne, apologised. However, the news the relatives had all feared was fast emerging nonetheless. After two days of fruitless searching for the Airbus A320-200, shortly after midday local time search planes spotted what appeared to be an aircraft door, an emergency slide and other debris in the water.

It was six miles from where the airliner, carrying 162 passengers and crew from Indonesia’s second city to Singapore, vanished shortly after requesting an altitude change to avoid a storm. Officials said the debris appeared to be red and white, the colours of AirAsia. Bambang Soelistyo, the head of Indonesia’s national search and rescue agency, told a press conference that spotters had also seen what appeared to be a “shadow” on the relatively shallow seabed, possibly the main wreckage.

As dusk fell over the search site the airline’s parent company, Malaysia-based AirAsia released a statement saying Indonesian officials had formally confirmed that the debris came from flight QZ8501. By nightfall, search and recovery teams – which included around 30 ships and 15 aircraft from nine countries – had recovered a number of bodies, estimated at around 40, as well as more debris and some personal possessions, including a blue suitcase, unopened and undamaged.

Tony Fernandes, the flamboyant Malaysian tycoon who founded AirAsia and is also chairman of Queens Park Rangers football club, said the news left him “absolutely devastated”. He met a number of the relatives at the airport to apologise personally and offer his condolences. “The passengers were on my aircraft and I have to take responsibility for that,” Fernandes told reporters. “It’s an experience I never dreamt of happening and it’s probably an airline CEO’s worst nightmare.”

It is the airline’s first fatal incident, and on Tuesday another AirAsia plane made an emergency landing. Passengers on board a flight to Kalibo, in the Philippines, tweeted photos of the plane with its emergency chutes deployed after it apparently overshot the runway while landing in bad weather.

Indonesia’s president, Joko Widodo, who visited the airport to meet the families and talk to Fernandes, said all efforts would be devoted to recovering the remaining bodies and the wreckage as quickly as possible. In a brief statement to the press he said the waters around the crash site appeared to be around 25 metres in depth, relatively easy for scuba divers to reach.

The shallow seas – around 1% of the depths involved in the ongoing search off Australia for Malaysia Airlines flight MH370, which disappeared without trace in March – should make it more straightforward to locate the plane’s black box flight recorders and thus, possibly, to discover why it crashed. Nonetheless, weather conditions were challenging, with navy officials saying waves were three metres high.

Fernandes said the pilot, named in reports as Captain Iriyanto, was “extremely experienced”, with 20,000 hours of flying time. Fernandes appeared to blame the weather, saying: “There were some very unique weather conditions and let’s wait for the investigation to be concluded.”

An Indonesian investigator, speaking to Reuters anonymously, said the inquiry was focusing on when the crew decided to ascend to avoid the bad weather. “We know that the weather was very bad in this area, there was a storm,” the official said. “Why did he [the pilot] request to climb at that stage? Should he have climbed earlier? Other aircraft were flying at a higher altitude in that area. How did the two pilots react to the weather? We are asking those questions.”

In the meantime, the relatives of those on board, among them 18 children and infants, must wait to learn what happened, and hope their bodies can be recovered. Fernandes said the devastating news at least meant relatives were no longer holding out hope in vain.

Some at Surabaya’s airport agreed. Agus Panjaya, a 36-year-old businessman, had been awaiting news of his grandmother, and his aunt and uncle, as well as their three children. “Of course we feel sad about our loved ones but we had prepared ourselves for the worst,” he told AFP. “Before this everything was unclear. At least there is now some form of closure.”