By Lemma \ref{lemma-characterize-quasi-compact} we may choose an affine formal algebraic space $Y$ and a representable surjective \'etale morphism $Y \to X$. Write $Y = \colim Y_\lambda$ as in Definition \ref{definition-affine-formal-algebraic-space}. \medskip\noindent Pick $\lambda \in \Lambda$. Then $Y_\lambda \times_X Y$ is a scheme by Lemma \ref{lemma-presentation-representable}. The reduction (Lemma \ref{lemma-reduction-formal-algebraic-space}) of $Y_\lambda \times_X Y$ is equal to the reduction of $Y_{red} \times_{X_{red}} Y_{red}$ which is quasi-compact as $X$ is quasi-separated and $Y_{red}$ is affine. Therefore $Y_\lambda \times_X Y$ is a quasi-compact scheme. Hence there exists a $\mu \geq \lambda$ such that $\text{pr}_2 : Y_\lambda \times_X Y \to Y$ factors through $Y_\mu$, see Lemma \ref{lemma-factor-through-thickening}. Let $Z_\lambda$ be the scheme theoretic image of the morphism $\text{pr}_2 : Y_\lambda \times_X Y \to Y_\mu$. This is independent of the choice of $\mu$ and we can and will think of $Z_\lambda \subset Y$ as the scheme theoretic image of the morphism $\text{pr}_2 : Y_\lambda \times_X Y \to Y$. Observe that $Z_\lambda$ is also equal to the scheme theoretic image of the morphism $\text{pr}_1 : Y \times_X Y_\lambda \to Y$ since this is isomorphic to the morphism used to define $Z_\lambda$. We claim that $Z_\lambda \times_X Y = Y \times_X Z_\lambda$ as subfunctors of $Y \times_X Y$. Namely, since $Y \to X$ is \'etale we see that $Z_\lambda \times_X Y$ is the scheme theoretic image of the morphism $$ \text{pr}_{13} = \text{pr}_1 \times \text{id}_Y : Y \times_X Y_\lambda \times_X Y \longrightarrow Y \times_X Y $$ by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-quasi-compact-scheme-theoretic-image}. By the same token, $Y \times_X Z_\lambda$ is the scheme theoretic image of the morphism $$ \text{pr}_{13} = \text{id}_Y \times \text{pr}_2 :  Y \times_X Y_\lambda \times_X Y \longrightarrow Y \times_X Y $$ The claim follows. Then $R_\lambda = Z_\lambda \times_X Y = Y \times_X Z_\lambda$ together with the morphism $R_\lambda \to Z_\lambda \times_S Z_\lambda$ defines an \'etale equivalence relation. In this way we obtain an algebraic space $X_\lambda = Z_\lambda/R_\lambda$. By construction the diagram $$ \xymatrix{ Z_\lambda \ar[r] \ar[d] & Y \ar[d] \\ X_\lambda \ar[r] & X } $$ is cartesian (because $X$ is the coequalizer of the two projections $R = Y \times_X Y \to Y$, because $Z_\lambda \subset Y$ is $R$-invariant, and because $R_\lambda$ is the restriction of $R$ to $Z_\lambda$). Hence $X_\lambda \to X$ is representable and a closed immersion, see Spaces, Lemma \ref{spaces-lemma-morphism-sheaves-with-P-effective-descent-etale}. On the other hand, since $Y_\lambda \subset Z_\lambda$ we see that $(X_\lambda)_{red} = X_{red}$, in other words, $X_\lambda \to X$ is a thickening. Finally, we claim that $$ X = \colim X_\lambda $$ We have $Y \times_X X_\lambda = Z_\lambda \supset Y_\lambda$. Every morphism $T \to X$ where $T$ is a scheme over $S$ lifts \'etale locally to a morphism into $Y$ which lifts \'etale locally into a morphism into some $Y_\lambda$. Hence $T \to X$ lifts \'etale locally on $T$ to a morphism into $X_\lambda$. This finishes the proof.