If my cactus has rot, can it be saved?
Probably the single largest reason for the demise of cactus plants is overwatering. This can result in rot that is only apparent when the plant falls over. At this point, one has to consider the options. If the top is rotted but the roots are sound, it is a simple matter to cut the rot out. This wound has to be allowed to dry in a place with good air circulation or else the rot will continue until the whole thing turns to mush. Even a jagged cut with a pocket knife is better than allowing the rot to continue. If the plant is soft on the bottom, the roots are most likely also rotted and should be discarded. Cutting the top where the tissue is sound with a clean instrument is the surest way to start the rooting process. Sterilization of the knife is not always necessary, but the cleaner the instrument the less the chance of introducing any other pathogens to the cut surface. Make a nice flat cut where all of the tissue is sound, then allow to callous in an airy place until the face of the cut is dry. This can take several days to several weeks, depending on the plant and the conditions. After the callus forms, put the plant into well draining soil and do not water. It is not necessary to bury the plant, just good contact with the soil will suffice. If you water, you will have to wait for evaporation to take the water away because a plant with no roots takes up no water. While evaporation is working, so will rot, and the plant will most likely be set back even more.
Keep the plant in bright, but not direct sunlight and wait. If it is spring and the plant has most of it's original tissue, roots can rapidly form and watering can be resumed in a month or two, usually closer to two. If, on the other hand, it is fall and most of the plant was rotted, root growth may not begin for several months and watering should not begin until evidence of root formation is evident. Evidence is when a gently rocking motion on the plant tells you roots have formed. If the plant was potted up recently, resist the urge to look for roots on a weekly basis. Monthly is usually often enough.
Like many things with plants, it may seem counterintuitive to cut off as much as (or more than) 1/2 the plant and then expect something positive to result. You gotta have faith.