The most effective way to sound proof an entire room/building is to use staggered double studs in the walls. The studs are placed close to each other, but not touching, with one staggered about 1/4" toward one side and the other 1/4" to the other side of the wall. The wall sheathing for inside is attached to the studs staggered toward the inside and similarly the outside sheathing to the ones staggered toward the outside. This way vibrations are not transmitted through the walls because the inside wall is not mechanically connected to the outside wall, except at the top and bottom plates.
The sound proofing can be enhanced by using acoustic dampening material on the inside walls to help keep the overall noise level lower inside the room. In addition putting damping material on the sheet metal of the machine can reduce the noise created by reverberation of these flat surfaces.
EDIT: Reread your post. Foam sheeting is not a good idea, rigid foam that is. Go down to your building supply store and rap a sheet with your knuckles, it rings like a drum. You can get fiber insulation batts that are supposed to help reduce sound transmission but putting these inside a double studded wall may not help as they will provide a path for transmission of vibration.