I agree with Josh.
I would like to add ... after you trim the roots ... trim the branches back to a point where you have healthy tissue. I would check the drain hole to make sure it is not clogged. It is also a good idea to enlarge or add drain holes.
Has your plant been outside when it was cold ? I ask because it looks like primarily the leaves look damaged, The trunk and branches look ok from what I can tell. If the plant was in freezing conditions the leaves are the first to go. Usually if a plant is water logged the trunk becomes rotten (soft any mushy). Try to squeeze the base of the trunk ... is it firm or soft ?
Assuming you have watered regulary its likely suffering from root rot.
I would recomend removing it from the pot to inspect the roots
If they are rotten cut them off and then plant it in new dry cactus soil. Don't water for a while but mist it heavily every day.
Hope this helps.