If its just banged up, usually some sandpaper and maybe some wood filler can do the job. Corners are a bit trickier, and you probably won't be able to get a nice sharp corner. The real problem is water damage, where hthe wood has expanded and is flaking apart. For that you really can only cut off the damaged part and put in a patch made from another piece of MDF and blend the seam with wood filler putty.