We present the theory and design of a tunable gain-flattening filter for integrated mode-locked lasers (MLLs). The filter provides the inverse of the semiconductor spectral gain profile and produces a broad flattened net gain. This improves the performance of MLLs by allowing more modes to lase simultaneously. We demonstrate a gain-flattened MLL with a record 10 dB bandwidth of 2.08 THz, the widest frequency comb span for an integrated quantum-well-based laser at 1.55 μm. Gain-flattening theory is used to extend the integrated comb span to 40 nm. We use scattering matrices to investigate feed-forward filters based on asymmetric Mach-Zehnder interferometers (MZIs). We compare MZI filters designed for a fixed coupling value to those that use an active gain arm to adjust the extinction ratio. Tunable zero placement of these filters is achieved using a passive phase tuning arm. The optimized gain-flattening filter has a 5 dB extinction ratio and a 70 nm free-spectral-range. When the filter is incorporated into a ring MLL, simulations predict a 40 nm, i.e., 5 THz, comb span with a power variation <; 3.5 dB.