"Fortune My Foe", also known as "The Hanging Tune" is an Irish and English Slow Air in 3/4 time in G major (Williamson) or F Major (Flood). Internet sources describe the tune given in Williamson as being in E minor when it is obviously in G major.
The parts are played AABB.
This 16th century Irish tune was used, according to Flood, in 1576 for a ballad on the death of a great patron of music, Walter Devereux, Earl of Essex, in Dublin, entitled "Welladay, or Essex's Last Goodnight". The tune appears in several early collections, including William Ballet's Lute Book (1593), the Fitzwilliam Virginal Book where the setting is by the famous English composer William Byrde (1528-1625) and William Foster's Virginal Book (1624). It was licensed as a ballad in 1565-6 and is mentioned in Shakespeare's The Merry Wives of Windsor.
Various songs and ballads came to be sung to the tune, including an early ballad "Titus Andronicus' Complaint" on which Shakespeare founded his play. Most of these songs seem to have been about themes of gloom, misery, and death.
Chappell, in his Popular Music of the Olden Time (1859) gives an extended description of uses from many sources, include Roxburghe. He gives only one melody from the Bagford Collection of Ballads which differs from the one given here by being in 4/4 time and G minor.
Williamson writes "'Fortune My Foe' was sung and played so frequently at public executions that it became known as 'The Hanging Tune'...'Fortune My Foe' originated in Ireland. The setting written here is believed to be the earliest version".
It was printed in Flood's A History of Irish Music (1906) and Williamson's English, Welsh, Scottish and Irish Fiddle Tunes (1976).
The version given here is from Williamson.