There are many different ways to look at degrees of freedom. I wanted to provide a rigorous answer that starts from a concrete definition of degrees of freedom for a statistical estimator as this may be useful/satisfying to some readers:
Definition: Given an observational model of the form $$y_i=r(x_i)+\xi_i,\ \ \ i=1,\dots,n$$ where $\xi_i=\mathcal{N}(0,\sigma^2)$ are i.i.d. noise terms and the $x_i$ are fixed. The degrees of freedom (DOF) of the estimator $\hat{y}$ is defined as $$\text{df}(\hat{y})=\frac{1}{\sigma^2}\sum_{i=1}^n\text{Cov}(\hat{y}_i,y_i)=\frac{1}{\sigma^2}\text{Tr}(\text{Cov}(\hat{y},y)),$$ or equivalently by Stein's lemma $$\text{df}(\hat{y})=\mathbb{E}(\text{div} \hat{y}).$$
Using this definition, let's analyze linear regression.
Linear Regression: Consider the model $$y_i=x_i\beta +\xi_i,$$ with $x_i\in\mathbb{R}^p$ are independent row vectors. In your case, $p=2$, and the $x_i={z_i,1}$ correspond to a point and the constant $1$, and $\beta=\left[\begin{array}{c}
m\\
b
\end{array}\right]$, that is a slope and constant term so that $x_i \beta=m z_i+b$. Then this can be rewritten as $$y=X\beta+\xi$$ where $X$ is an $n\times p$ matrix whose $i^{th}$ row is $x_i$. The least squares estimator is $\hat{\beta}^{LS}=(X^T X)^{-1}X^Ty$. Let's now based on the above definition calculate the degrees of freedom of $SST$, $SSR$, and $SSE$.
$SST:$ For this, we need to calculate $$\text{df}(y_i-\overline{y})=\frac{1}{\sigma^2}\sum_{i=1}^n\text{Cov}(y_i-\overline{y},y_i)=n-\frac{1}{\sigma^2}\sum_{i=1}^n\text{Cov}(\overline{y},y_i)=n-\frac{1}{\sigma^2}\sum_{i=1}^n \frac{\sigma^2}{n}=n-1.$$
$SSR:$ For this, we need to calculate $$\text{df}(X\hat{\beta}^{LS}-\overline{y})=\frac{1}{\sigma^2}\text{Tr}\left(\text{Cov}(X(X^TX)^{-1}X^y,y\right)-\text{df}(\overline{y})$$ $$=-1+\text{Tr}(X(X^TX)^{-1}X\text{Cov(y,y)})$$ $$=-1+\text{Tr}(X(X^TX)^{-1}X^T)$$ $$=p-1.$$ In your case $p=2$ since you will want $X$ to include the all ones vector so that there is an intercept term, and so the degrees of freedom will be $1$. However note that this will equal the number of parameters when we are doing regression with multiple parameters.
$SSE:$ $(n-1)-(p-1)=n-p$, which follows linearity of $df$.
Best Answer
It is often worth it to write these models as a linear expression in lieu of expanding every possible sum. As is usual, I will write variables in lower case and matrices in upper case, otherwise notation will be a mess.
The model is $E(y) = X\beta,$ where $X$ is a matrix of full rank. We want to find the $\beta$ such that $\|y - X\beta\|^2$ is minimum. Calculus yields $$ \hat \beta = (X^\intercal X)^{-1} X^\intercal y $$ In your case, $X = [\mathbf{1}, x]$ where $x$ is your measurements (which you denoted with $X_i$) and $\mathbf{1}$ is a vector of ones. It is easy to see that $$ (X^\intercal X)^{-1} = \left[\begin{matrix} n &n\bar x\\n \bar x & x^\intercal x\end{matrix}\right]^{-1} = \dfrac{1}{n(x^\intercal x - n \bar x^2)} \left[\begin{matrix} x^\intercal x &-n\bar x \\-n \bar x&n\end{matrix}\right] $$ and $$ X^\intercal y = \left[\begin{matrix} n \bar y \\ x^\intercal y\end{matrix}\right], $$ so then $\hat \beta$ is $$ \hat \beta = \dfrac{1}{x^\intercal x - n \bar x^2}\left[\begin{matrix} (x^\intercal x) \bar y - (x^\intercal y) \bar x \\ x^\intercal y - n \bar x \bar y\end{matrix}\right]. $$ If $\hat \beta = (a, b)^\intercal,$ the previous solution reduces to $$ a = \bar y - \bar x b, \quad b = \dfrac{x^\intercal y - n \bar x \bar y}{x^\intercal x - n \bar x} = \dfrac{s_{xy}}{s_{xx}}, $$ where, for given vectors $v$ and $w,$ we write $$ s_{vw} = \dfrac{v^\intercal w - n \bar v \bar w}{n}, $$ which is the most common estimate of the covariance between them.
Now, by definition, the "Total Sums of Squares" is (what you called SSR and) given by $\mathsf{TSS} = \|\hat y - \bar y\mathbf{1}\|^2.$ In your case, this amounts to $$ \|\hat y - \bar y \mathbf{1}\|^2 = \|(a- \bar y) \mathbf{1} +bx\| = (a- \bar y)^2 \mathbf{1}^\intercal \mathbf{1} + 2(a - \bar y)b \mathbf{1}^\intercal x + b^2 x^\intercal x, $$ this simplifies to $$ (\bar x b)^2 n - 2(\bar x b) b n \bar x + b^2 x^\intercal x = b^2 (x^\intercal x - n \bar x^2) = \dfrac{s_{xy}^2}{s_{xx}^2} n s_{xx} = \dfrac{n s_{xy}^2}{s_{xx}}. $$
Now, your expression is $$ a n \bar y + b x^\intercal y - n \bar y^2 = (\bar y-\bar x b) n \bar y + b x^\intercal y - n \bar y^2 = b(x^\intercal y - n \bar x \bar y) = \dfrac{s_{xy}}{s_{xx}} n s_{xy} = \dfrac{n s_{xy}^2}{s_{xx}}. $$ Both expressions coincide. QED
Ammend. Apparently, the total sum of squares is actually $\|y - \bar y \mathbf{1}\|^2$ and what you call the sums of squares due to regression does not appear in my books (e.g. Mardia, Kent and Bibby "Multivariate Analysis"; Seber and Lee "Linear Regression Analysis"; Seber "Multivariate Observations"; Takeuchi, Yanai and Mukherjee "The Foundations of Multivariate Analysis"; Casella and Berger "Statistical Inference"; etc.)