Donald Trump and Barack Obama are set to come face to face for the first time since Trump’s inauguration when they join thousands of mourners at former president George HW Bush’s state funeral on Wednesday.

The Washington political elite are expected to put acrimony and partisanship aside for a day to honour the 41st president, who died last week at the age of 94.

The national cathedral will witness a rare gathering of every living president: Trump, Obama, Jimmy Carter, Bill Clinton – and the 43rd president George W Bush, son of the 41st president, who will deliver a eulogy. Current and former first ladies will also be present, putting election rivals Trump and Hillary Clinton at close quarters.

Trump has declared it a national day of mourning and been uncharacteristically gracious, lavishing praise on Bush and burying the hatchet with his family after past animus (he branded Bush’s son Jeb “low energy” during the 2016 presidential election). There is a stark contrast with the funeral of Senator John McCain in September, to which the president was not invited and where anti-Trump sentiment was palpable.

The Bush family contacted the White House over the weekend to say that Trump would be welcome at the funeral, and to assure him that the focus would be on Bush’s life rather than their disagreements, the Washington Post reported, citing a former administration official.

On Tuesday the first lady, Melania Trump, hosted the former first lady Laura Bush at the White House, giving her a personal tour of this year’s Christmas decorations. A few hours later, the Trumps paid the Bush family a visit at Blair House, the official government guest house across the street from the White House grounds. As the families greeted each other, Trump twice placed his hand on Laura Bush’s back.

Sign up for the new US morning briefing

Along with a eulogy from George W Bush at the funeral on Wednesday, eulogies will also be delivered by two of George HW Bush’s friends, the former Canadian prime minister Brian Mulroney and former Republican senator Alan Simpson of Wyoming, along with the Pulitzer prize-winning historian and Bush biographer Jon Meacham, who gave a memorable address at former first lady Barbara Bush’s funeral earlier this year. George HW and Barbara were married for more than 70 years.

The service will also have an international flavour. From the UK, Prince Charles will attend on behalf of the Queen. The former Polish president Lech Walesa, the founder of the anti-communist Solidarity movement, and the current Polish president, Andrzej Duda, are reportedly planning to attend.

It will be the first presidential state funeral since that for Gerald Ford 12 years ago. Bush, the last president from the second world war era, who occupied the White House from 1989 to 1993, will be buried at his presidential library at Texas A&M University on Thursday.