Eventually, someone will find the gym and take him down, and it will be easy because his motivation will be nearly nil.
If that doesn't happen in a few weeks, start asking friends who play if they could take it down for you.
I had a Nidoqueen stuck in a gym for 109 days. Not really a problem, that, but that gym is still my highest on points, despite no victories, no berries, and never going back there. I reserve Snorlax, Blissey and Chancey for the busy gyms, ones I know I might not hold for an hour.