Let
$$S := \pmatrix{A&B\\C&D}$$
If $A^{-1}$ or $D^{-1}$ exist, we know that matrix $S$ can be inverted.
$$S^{-1} = \pmatrix{A^{-1}+A^{-1}B(D-CA^{-1}B)^{-1}CA^{-1}&-A^{-1}B(D-CA^{-1}B)^{-1}\\-(D-CA^{-1}B)^{-1}CA^{-1}&(D-CA^{-1}B)^{-1}}$$
But, what if $A^{-1}$ and $D^{-1}$ do not exist? Can we invert matrix $S$?
For example,
$$S = \pmatrix{0&1\\1&0}$$
or
$$S = \pmatrix{2&3&1&1\\4&6&1&2\\1&1&3&1\\4&1&12&4}$$
both their $A^{-1}$ and $D^{-1}$ don't exist, but $S^{-1}$ exists.
I saw a paper on this topic by Lu and Shiou some years ago. Here is the link. They first introduced the formula you mentioned and then investigated other special cases.