Cave Diver beat me to the punch, where oh where is your buddy?
OK, lets play with it and say your buddy just got swallowed by a giant whale and there you are at 140, your SPG says 0 PSI. What would I do? I would ascend as close to 60 feet per min as I could, knowing that on the way up I will gain enough air on an empty tank to get at least 4 - 6 good breaths from my tank as its air becomes available. (boyles law) Fast ascents are bad, remember that. A missed safety stop is not good, but not as bad as a fast ascent. I'm working under the asumption that this is not a deco dive. If this were, then you would most likely run a very high risk of a DCS hit and a chamber ride.
In reality I would feel a little panic and have to concentrate on the task at hand, not letting myself get focused on needing to surface at all costs. This in all honesty would be hard, but not imposible. Any divers who claims that they would not feel even a little panic is either dead or a liar. It's not a question of "if" you feel paniced, it's how you deal with it that counts. You learn to deal with it by practice, lots of practice.