A new method is proposed for robust control of spacecraft in proximity orbit servicing operations from an optimal control formulation. It can be shown that the robust control of the nonlinear uncertain system is equivalent to the optimal controlled nominal system with a modified cost functional including uncertainty bounds such that both stabilization and optimal performance can be achieved. The $\theta$-D technique is utilized to design a closed-form control law, which facilitates the onboard implementation. The pursuer spacecraft is controlled to autonomously approach a target at a specified safe relative position and align its docking port towards the one on the target while keeping their attitude synchronized. Flexible motion, parameter uncertainties, and external disturbance are considered in the control design to enhance the robustness.