When you've used Debian for some time, you learn to avoid broken dependencies -- and when they happen, you learn to fix them before they grow so big that you need to re-install.
Debian stable should not have any broken dependencies but installing packages from unofficial sources may introduce breakages.
Debian testing is a moving target and sometimes there are temporary breakages. If you track Debian testing, you should install the "apt-listbugs" package that will warn you of packages that have bug reports filed against them. If the bug reports that apt-listbugs lists are marked as "done", the reported bugs have already been fixed and it should be safe to install the package. But if apt-listbugs tells that the bug report is still "open", then you should consider carefully if the reported bug might affect your system. Sometimes the Debian maintainers are unable to reproduce the reported bug and so they let the package migrate from unstable to testing. So every time when you install/upgrade a package that has open bug report filed against it, you're taking a calculated risk. At least you've been warned by apt-listbugs if something bad happens.
If you track Debian testing and something breaks, you can usually fix things either by uninstalling the broken package, changing sources.list to temporarily point to stable and installing an older version of the broken package from stable. Or you can temporarily point sources.list to unstable and install a newer version of the package. Or you can just wait until apt-listbugs tells you that it's safe to install/upgrade the package.
I've found aptitude to be quite useful tool for this kind of negotiations with broken packages. If apt-listbugs tells you that some package you're about to upgrade has open bug reports filed against it, you can press the "=" key on that package and this tells aptitude to put that package "on hold" and not to upgrade it. And after a week or two has passed, you can press "+" on that package to mark it to be upgraded, so you can test if apt-listbugs still warns you about it.
When you're careful installing and upgrading packages and when you learn to negotiate your way around small breakages as described above, you should never again stumble into the kind of large-scale breakage that you've just experienced.