None of these are record breakers but you may find them of interest.
Marfa Matveyevna Apraksina, wife of Czar Feodor III of Russia was a widow for 34 years
Isabella of France wife of Edward II of England was a widow for 31 years.
Blanche of Castile, wife of Louis VIII of France was a widow for 26 years.
Adelaide of Italy, wife of Holy Roman Emperor Otto I the Great was a Widow for 26 years
Joan of Navarre, wife of Henry IV of England was a Widow for 24 years
Anne of Austria, wife of Louis XIII of France was a widow for 23 years
Margaret of Burgundy, wife of Charles I of Naples and Sicily was a widow for 23 year.
Catherine of Braganza, wife of Charles II of England was a widow for 20 years
Does Empress Zita of Austria-Hungary hold the record for the longest widowhood, among European royals? After all, her husband died in 1922, when she was in her 30th year; she herself lived on until 1989, her 97th year.
Her own mother, the duchess consort of Bourbon-Parma (born Infanta Antonia of Portugal) was also a widow for more than 50 years (1907-1959). She, too, had died in her 97th year.
Following closely behind her would be Queen Elizabeth, the Queen Mother of Great Britain, who survived her husband (King George VI) by 50 years.
But I don't know if there was a longer widowhood than Zita's, or if somebody other than her mother ranks just behind her.
As for widowerhood: does Prince Regent Luitpold of Bavaria hold the record for the longest, at 48 years?