According to the following, your GPU should be returned if the HAM-EWR segment doesn't clear.
In most cases, the Global Premier Upgrade will be considered used if any segment of an itinerary is upgraded or flown. However, for travel which includes segments in United BusinessFirst or United Global First, the Global Premier Upgrade will be re-deposited if the United BusinessFirst or United Global First segment(s) could not be upgraded.
Source:
http://www.united.com/web/en-US/cont...wupgrades.aspx