Suppose I have a rational function defined by ($s$ complex) $$ f(s)=w^T s(sI-Q)^{-1} v $$ for nonzero column vectors $w,v$ and a (large) square matrix $Q$. Further assume that $Q$ is singular and that it is known that $f(0)=\lim_{s\rightarrow 0} f(s)$ exists finite. Clearly, for any $s$ that is not an eigenvalue of $Q$, one can compute $f(s)$ by $$ f(s)=s \cdot w^T y \text{ where $y$ is the unique solution of } (sI-Q)y=v $$ which is quite efficient and numerically stable.

**Question**: is there a similar way of computing $f(0)$, that is (ideally) by solving a single linear system?

[**Context**. In my problem, $f(s)$ arises as $sF(s)$, where $F(s)$ is the Laplace transform of a certain (exponential) function $g(t)$. The result is needed as a method to compute $f(0)=\lim_{t\rightarrow \infty} g(t)$, which is the final value theorem for Laplace transform.]