If the server is about to swap itself to death and there are huge number of processes fighting for CPU and other resources, then it's a bit difficult thing to do. Sometimes if a server is very overloaded, even a new ssh connection can be hard to establish.
In the situations like that I usually have another server in the same network and I have a ssh connection in screen from that server to the overloaded server. When the overloaded server becomes too overloaded, I ssh to that another server and resume my screen session.
But you have other options, too.
It's possible to partition processes to several domains using cpusets kernel feature. That way you can give one domain to your applications and allow it to use only some cores and some amount of memory. Then you can create another domain for system administration, so you should have some room left for your ssh needs.
Before doing this, though, you should be certain where does the high system load come from. Is it because of extremely high CPU usage? Are the applications constantly accessing disk and making I/O operations very slow? Are the applications eating up all the RAM and swapping causes the slowness? Is the memory/other resource usage expected or is there a bug lurking around in your application, causing it to suddenly eat up all the RAM or CPU?
If the latter, then you can install psmon or similar software. psmon can monitor your system and shoot down & restart the watched process(es) if it takes more than X megabytes of RAM or constantly takes more than Y% of CPU, for example.
And if the high resource usage is expected, then you should consider upgrading your hardware.