We know that for any square matrix $B$ and $\epsilon$ small, we have the expansion $$ \det (I+\epsilon B) = 1+\epsilon Tr(B) + O(\epsilon^2) $$ where $Tr(B)$ is the trace of $B$, this can be generalized for a nonsingular matrix $A$ to give the expansion $$ \det (A+\epsilon B) = \det(A)\det(I+\epsilon A^{-1}B)= \det(A)(1+\epsilon Tr(A^{-1}B)+O(\epsilon^2)). $$
So my question is: are there any similar formulas when $A$ is a singular matrix? Looking at some examples, I suspect the order of the higher order term is related to the dimension of the kernel of $A$, for example, if $A= \begin{pmatrix}0&0\\0&1\end{pmatrix}$, which has a $1$ dimensional kernel, then assume $B = \begin{pmatrix}a&b\\c&d\end{pmatrix}$, we get $\det(A+\epsilon B)= \epsilon a+O(\epsilon^2)$, whereas if $A$ is the (2 by 2) zero matrix, then $\det (A+\epsilon B)$ is clearly $O(\epsilon^2)$.