Data gaps in space-borne gravitational wave detectors, arising from factors such as micrometeorite collisions or hardware malfunctions, pose a significant challenge in gravitational wave data processing. The milli-Hertz observation frequency range and possible day-scale occurance rate for the gap makes the appropriate estimating of the noise property, and correspondingly the following data analysis challenging. To mitigate the impact of data gaps in gravitational wave data, we develop an inpainting algorithm to fill in the data gap. This allows preserves data continuity without adding additional information of matched-filtering and likelihood. We demonstrate the efficacy of this algorithm with a simulated TianQin observation data for massive black hole mergers, showing that the inpainting allows correct analysis of the massive black hole properties as if the gap almost does not exist.