Let $(F_n)_{n \in \mathbb{N}}$ be the Fibonacci sequence: $F_0=0$, $F_1=1$ and $\forall n \in \mathbb{N}: F_{n+2}=F_{n+1}+F_{n}$. Now let $$f(x):=\sum\limits_{n \in \mathbb{N}} F_n x^n$$ So we have that $$f(x)=x+\sum\limits_{n > 1} F_n x^n$$ $$f(x)=x+\sum\limits_{n > 1} F_{n-1} x^n+\sum\limits_{n > 1} F_{n-2} x^n$$ $$f(x)=x+\sum\limits_{n > 1} F_{n-1} x^{n-1} x+\sum\limits_{n > 1} F_{n-2} x^{n-2} x^2$$ $$f(x)=x+x\sum\limits_{n \in \mathbb{N}} F_{n} x^n+x^2\sum\limits_{n \in \mathbb{N}} F_{n} x^n$$ So $$f(x)=x+xf(x)+x^2f(x)$$ $$f(x)=\frac{x}{1-x-x^2}$$ And if we go on, we can find a closed form for $F_n$.
Q: Can we do this in general to get a closed form for the generating function $g(x)=\sum\limits_{n \in \mathbb{N}} a_n x^n$ without knowing anything about it's convergence? And if the answer is no, then how could we make it mathematically correct?
You certainly can in the case of a linear recurrence $a_n =\sum_{k=1}^m c_k a_{n-k} $.
If you assume a solution of the form $a_n = r^n$ then you get $r^n =\sum_{k=1}^m c_k r^{n-k} $. Multiplying by $r_{m-n}$ we get $r^{n+m-n} =\sum_{k=1}^m c_k r^{n-k+m-n} $ or $r^{m} =\sum_{k=1}^m c_k r^{m-k} =\sum_{k=0}^{m-1} c_{m-k} r^{k} $.
This is called the characteristic polynomial of the recurrence and its roots determine the growth of $a_n$ depending on the initial conditions.
You can also get the generating function of the recurrence.
Let $A(x) =\sum_{n=0}^{\infty} a_nx^n $. Then, naming some things along the way,
$\begin{array}\\ A(x) &=\sum_{n=0}^{\infty} a_nx^n\\ &=\sum_{n=0}^{m-1} a_nx^n+\sum_{n=m}^{\infty} a_nx^n\\ &=B(x)+\sum_{n=m}^{\infty} \sum_{k=1}^m c_k a_{n-k}x^n\\ &=B(x)+\sum_{n=m}^{\infty} \sum_{k=1}^m x^kc_k a_{n-k}x^{n-k}\\ &=B(x)+\sum_{k=1}^m x^kc_k\sum_{n=m}^{\infty} a_{n-k}x^{n-k}\\ &=B(x)+\sum_{k=1}^m x^kc_k\sum_{n=m-k}^{\infty} a_{n}x^{n}\\ &=B(x)+\sum_{k=1}^m x^kc_k\left(\sum_{n=0}^{\infty} a_{n}x^{n}-\sum_{n=0}^{m-k-1} a_{n}x^{n}\right)\\ &=B(x)+\sum_{k=1}^m x^kc_k\left(A(x)-A_k(x)\right)\\ &=B(x)+A(x)\sum_{k=1}^m x^kc_k-\sum_{k=1}^m x^kc_kA_k(x)\\ \end{array} $
so $A(x)(1-\sum_{k=1}^m x^kc_k) =B(x)-\sum_{k=1}^m x^kc_kA_k(x) $.
You can work this further to get explicit forms for the polynomial on the right, but I'll stop here.