First, show that such a function must have only one simple pole in the extended complex plane. Then subtract the principal part, so that you are left with an analytic function with no pole in the extended plane; by Liouville's theorem, such a function must be a constant. So is of the form you describe.