How to complete the following proof of Bolzano's Theorem? I am trying to prove Bolzano's Theorem using the following argument. But the problem actually is that though "intuitively" I can "see" why the argument works (if I am not wrong in "seeing"), I can't write down a rigorous proof. The argument is as follows,

Bolzano's Theorem
If $f:[a,b]\to\mathbb{R}$ be a continuous function such that $f(a)<0$ and $f(b)>0$ then, $$\exists c\in(a,b)\mid f(c)=0$$
Incomplete Proof. Let us consider the sets, $$S^+:=\{f(x):f(x)>0\}$$$$S^-:=\{f(x):f(x)<0\}$$If possible let us assume the negation of the proposition, i.e., for all $ c\in(a,b)$ we have $f(c)\ne 0$.
Since $f$ is a function from a closed and bounded set, we can claim that both the sets $S^+$ and $S^-$ are bounded. So $\inf S^+$ and $\sup S^-$ both exists. Now construct a sequence $\bigl(f(x_n)\bigr)_{n\ge1}$ from $S^+$ such that, $$\inf S^++\dfrac{1}{n}>f(x_n)\ge\inf S^+$$Since $(x_n)_{n\ge1}$ is a bounded sequence so there exists a convergent subsequence $(x_{n_k})_{k\ge1}$ of $(x_n)_{n\ge1}$. Let $(x_{n_k})_{k\ge1}$ converge to $x_0$. Due to the continuity of $f$ we can say that $\bigl(f(x_{n_k})\bigr)_{k\ge1}$ converge to $f(x_0)$ which is nothing but $\inf S^+$.
Also, since $f(x_{n_k})>0$ for all $k\in\mathbb{N}$, we can say that $f(x_0)\ge0$. But by our hypothesis $f(x)\ne0$ and so $f(x_0)>0$. Hence $f(x_0)\in S^+$.
Similarly it can be shown that for some $y_0\in [a,b]$ we have $\sup S^-=f(y_0)<0$.

After this, I can't proceed. The geometric intuition behind the proof was (in very brief) as follows,

Imagine a continuous function $f$ that does not satisfy Bolzano's Theorem. Then there will be a gap between the points $(x_0,f(x_0))$ and $(y_0,f(y_0))$.

$\color{crimson}{\text{Note that I am not looking for a proof of Bolzano's theorem.}}$ Specifically, I just want suggestions for completing this proof (if possible).
 A: Your argument shows that $S^+$ is closed.
Let $(y_n)$ be a sequence in $S^+$, convergent to $y$. Our task is proving that $y\in S^+$.
Let $y_n=f(x_n)$; then the sequence $(x_n)$ in $[a,b]$ has a convergent subsequence $(x_{n_k})$. Say that $x$ is the limit point of this subsequence. Then
$$
f(x)=\lim_{k\to\infty}f(x_{n_k})=\lim_{n\to\infty}f(x_n)=y
$$
Then of course $y=f(x)\ge0$, but it can't be $f(x)=0$, so $y=f(x)\in S^+$.
It's the same argument you used for proving that $\inf S^+\in S^+$.
Now the set of values of $f$ is the disjoint union of closed sets, so it is disconnected. This is a contradiction.

Note. Why is this not a good proof? Because it's basically the same proof that the connected subsets of the real line are the intervals. Applying the theorem that continuous maps preserve connectedness, together with the fact about intervals is sufficient for proving the theorem: the set of values of $f$ is an interval containing a negative and a positive value, so it contains also $0$.
You could end the proof without making explicit appeal to connectedness, but you'd be basically reproving the fact about intervals.
Note also that you make appeal to compactness (the Bolzano-Weierstraß property), which is not really necessary here.
A: The following proof is not exactly along the lines posted in the question, nevertheless it doesn't differ radically.

Let us consider the sets, $$S^+:=\{f(x):f(x)>0\}$$$$S^-:=\{f(x):f(x)<0\}$$Since $f$ is a function from a closed and bounded set, we can claim that both the sets $S^+$ and $S^-$ are bounded. So $\inf S^+$ and $\sup S^-$ both exists. Now notice that $\inf S^+\ge \sup S^-$. If $\inf S^+=\sup S^+$ then we have nothing to prove. So, assume that $\inf S^+>\sup S^-$.
$\\$Construct the sequence $\bigl(f(u_n)\bigr)_{n\ge1}$ from $S^+$ such that, $$\inf S^++\dfrac{1}{n}>f(u_n)\ge \inf S^+$$ Since $(u_n)_{n\ge1}$ is a bounded sequence, by Bolzano-Weierstrass Theorem there exists a convergent subsequence $(u_{n_k})_{k\ge1}$ of $(u_n)_{n\ge1}$. Let $(u_{n_k})_{k\ge1}$ converge to $\alpha$. By Sandwich Theorem $\bigl(f(u_{n_k})\bigr)_{k\ge1}$ will converge to $\inf S^+$.  Furthermore due to continuity of $f$ we have $f(\alpha)=\inf S^+\ge 0$.
$\\$Similarly, construct the sequence $\bigl(f(v_n)\bigr)_{n\ge1}$ from $S^-$ such that, $$\sup S^--\dfrac{1}{n}<f(v_n)\le\sup S^-$$ Since $(v_n)_{n\ge1}$ is a bounded sequence, by Bolzano-Weierstrass Theorem there exists a convergent subsequence $(v_{n_k})_{k\ge1}$ of $(v_n)_{n\ge1}$. Let $(v_{n_k})_{k\ge1}$ converge to $\beta$. By Sandwich Theorem $\bigl(f(v_{n_k})\bigr)_{k\ge1}$ will converge to $\sup S^-$.  Furthermore due to continuity of $f$ we have $f(\beta)=\sup S^-\le 0$.
$\\$Now, without loss of generality let us assume that $\alpha<\beta$. Consider the interval $(\alpha,\beta)$. Since $f(\alpha)\ge 0$, there exist $\delta_\alpha>0$ such that $z\in (\alpha-\delta_\alpha,\alpha+\delta_\alpha)\cap [a,b]$ implies that $f(z)\ge 0$.
Let $\mathcal{D_\alpha}$ be the set of all such $\delta_\alpha$'s. Then $\mathcal{D_\alpha}$ is non-empty and it is bounded by $\left\lvert a-b\right\rvert$. So $\sup \mathcal{D_\alpha}$ exists. Similarly, we construct the set $\mathcal{D_\beta}$ by taking all those positive $\delta_\beta$'s for which $z\in (\beta-\delta_\beta,\beta+\delta_\beta)\cap [a,b]$ implies that $f(z)\le 0$ and consider $\sup \mathcal{D_\beta}$.

Case 1. If $(\alpha,\alpha+ \sup\mathcal{D_\alpha})\cap (\beta-\sup\mathcal{D_\beta},\beta)\ne \emptyset$ , then for all $x\in (\alpha,\alpha+ \sup\mathcal{D_\alpha})\cap (\beta-\sup\mathcal{D_\beta},\beta)$ we will have $f(x)=0$. Because, in this case $(\beta-\sup \mathcal{D_\beta},\alpha+ \sup\mathcal{D_\alpha})\ne \emptyset$ and so if $x\in (\beta-\sup \mathcal{D_\beta},\alpha+ \sup\mathcal{D_\alpha})$ then since $x\in (\beta-\sup \mathcal{D_\beta},\beta)$ we will have $f(x)\le 0$. Also since $x\in (\alpha,\alpha+\sup\mathcal{D_\alpha})$ we will have $f(x)\ge0$. We are thus forced to conclude that $f(x)=0$.
Case 2. On the other hand if $$(\alpha,\alpha+ \sup\mathcal{D_\alpha})\cap (\beta-\sup\mathcal{D_\beta},\beta)= \emptyset$$ then $(\alpha,\alpha+ \sup\mathcal{D_\alpha})\cap (\beta-\sup\mathcal{D_\beta},\beta)=\emptyset$. So in this case we consider the interval $[\alpha+\sup\mathcal{D_\alpha},\beta-\sup\mathcal{D_\beta}]$. Observe that $$\forall\varepsilon>0 \exists y\in[\alpha+\sup\mathcal{D_\alpha},\alpha+\sup\mathcal{D_\alpha}+\varepsilon)\mid f(y)\le 0$$ because otherwise our choice of $\sup \mathcal{D_\alpha}$ is contradicted. So, now construct the sequence $(x_n)_{n\ge1}$ where, $$\alpha+\sup\mathcal{D_\alpha}+\dfrac{1}{n}>x_n \bigl(f(x_n)\ge 0\bigr)\ge\alpha+\sup\mathcal{D_\alpha}\tag{1}$$also construct the sequence $(y_n)_{n\ge1}$ from $[\min (a,\alpha-\sup \mathcal{D_\alpha}),\alpha+\sup \mathcal{D_\alpha})$ $$\alpha+\sup\mathcal{D_\alpha}>y_n \bigl(f(y_n)\le 0\bigr)>\alpha+\sup\mathcal{D_\alpha}-\dfrac{1}{n}\tag{2}$$ Then both $(x_n)_{n\ge1}$ and $(y_n)_{n\ge1}$ converge to $\alpha+\sup\mathcal{D_\alpha}$. Now notice that from $(1)$ we can conclude that $f(\alpha+\sup \mathcal{D_\alpha})\ge  0$ and from $(2)$ we can conclude that $f(\alpha+\sup \mathcal{D_\alpha})\le  0$. Then $f(\alpha+\sup \mathcal{D_\alpha})= 0$ and we are done.

