Slope of a line segment. If $A(x_1, y_1)$ and $B(x_2, y_2)$, we know that slope $m = \frac {(y_2 - y_1)} {(x_2 - x_1)}$.

What decision can we take aout the line segment when, $m = \frac 0 0$, $m = \frac {dy} 0$, and, $m = \frac 0{dx}$? 

If $A(0,0)$ and $B(0, 10)$, what would be the slope of the line?
This formula is true if $A\neq B$. Then, in the first case you are taking $A=B$ and the formula does not work. When $x_1=x_2$ for all $A\neq B$ the slope is not defined (or it can be regarded as infinite). Last case, we have a horizontal line.
Please be careful not to use $dx$ and $dy$ to mean the difference between the $x$ and $y$ coordinates. It's better to use $\Delta x$ and $\Delta y$ for these differences. (The Greek letter $\Delta$ is pronounced "delta".)

If you have two distinct points, say $P(x_1,y_1)$ and $Q(x_2,y_2)$ then there is a unique line passing through $P$ and $Q$. As you correctly say: the gradient of this line is given by
$$m = \frac{y_1-y_2}{x_1-x_2} = \frac{\Delta y}{\Delta x}$$

If $\Delta x = 0$ and $\Delta y = 0$ then $x_1=x_2$ and $y_1=y_2$. This means $P=Q$ and so $P$ and $Q$ are not distinct and there are many lines passing through a single point, and no single gradient.

If $\Delta x = 0$ and $\Delta y \neq 0$ then $x_1=x_2$. This means that $P$ and $Q$ lie directly above/below one another, i.e. the line through $P$ and $Q$ is a vertical line. If $x_1=x_2=k$ then the equation of this line will be $x=k$. If you want to be naughty then we could say that the gradient is infinite.

If $\Delta x \neq 0$ and $\Delta y = 0$ then $y_1=y_2$. This means that $P$ and $Q$ lie directly to the left/right of one another, i.e. the line through $P$ and $Q$ is a horizontal line. If $y_1=y_2=k$, then the equation of this line will be $y=k$. In this case the gradient is zero.

In the case $A(0,0)$ and $B(0,10)$ then $\Delta x = 0$ and $\Delta y \neq 0$. The equation of the line through $A$ and $B$ will be $x=0$, i.e. the $y$-axis.