Many soft-matter systems show a transition between fluid-like and mechanically solid-like states when the volume fraction of the material e.g. particles, drops or bubbles is increased. Using an emulsion as a model system with a precisely controllable volume fraction, we show that the entire mechanical behavior in the vicinity of the jamming point can be understood if the mechanical transition is assumed to be analogous to a phase transition. We find power-law scalings in the distance to the jamming point, in which the parameters and exponents connect the behavior above and below jamming. We propose a simple two-state model with heterogeneous dynamics to describe the transition between jammed and mobile states. The model reproduces the steady-state and creep rheology, and relates the power-law exponents to diverging microscopic time scales.