Can we talk about the continuity/discontinuity of a function at a point which is not in its domain? Let us say that I have a function $ f(x)=\tan(x)$ we say that this function is continuous in its domain.
If I have a simple function like $$ f(x)=\frac{1}{(x-1)(x-2)} $$
Can we really talk about its continuity/discontinuity at $x=1$ or at $x=2$.
From what I know we can't since it is not in its domain.
But doesn't it make every function of the form $$ f(x)=\frac{1}{g(x)}$$ continuous in its domain. Where $g(x)$ is any polynomial and $g(x)=0$ at n points (lets say).

What you can ask is whether that function can be continuously extended also at $x=1,2$, i.e. whether given $f$ defined on, say, $\mathbb R\setminus\{ x_0 \}$ there exists a function $g$ defined and continuous on the whole $\mathbb R$ such that its restriction $g\|_{\mathbb R\setminus\{ x_0 \}}$ is equal to $f$. This may happen and it is called removable singularity, or removable discontinuity, though, as you say, it is not properly a point in which the function is discontinuous, since it is not defined there.
Rational function singularities, i.e. of the form $\frac{P(x)}{Q(x)}$ where $P$ and $Q$ are polynomials and $Q(x_0)=0$ are removable only if $P(x_0)=0$ as well and the multipliciy of this root in $P$ is equal or higher to the multiplicity of the root in $Q$ (in other words if you can simplify a common factor of the form $(x-x_0)^n$ in both polynomials). In the case $\frac 1{g(x)}$ with $g$ polynomial you can say that the function is always continuous in its domain but singularities are not removable.
