This paper presents a two-dimensional (2D) digital focusing method to alleviate the compromise between the resolution and depth of field (DOF) in spectral domain optical coherence tomography (SDOCT). A scalar diffraction model is developed to simulate the wave propagation process from out-of-focus scatterers and the inverse scattering problem is solved. The wavenumber domain algorithm is applied to improve the transverse resolution, and the matched filter to improve the axial resolution. Image reconstruction with spatially invariant resolution can be achieved. The 2D imaging experimental results of fresh pig liver prove the effectiveness of the proposed method.