Including non-squared frequency dependent attenuation is essential to obtain accurate acoustic predictions in biological media when wide-band signals and/or nonlinear effects are taken into account. Thus, a time domain nonlinear acoustics model is presented, where the dispersion and attenuation are included by means of relaxation processes. In this way, an efficient implementation by finite differences avoiding convolutional operators is developed. By optimizing a pair of relaxing parameters, the model exhibits an attenuation frequency response that fits a power law experimental data for most biological tissues. In this way, it is possible to obtain arbitrary frequency dependent attenuation and dispersion in order to model biological media. Furthermore, due to the generalized formulation, typical relaxation processes can be modeled as those observed in air or seawater, and used to model the losses of longitudinal waves observed in other complex heterogeneous media, such as soil or porous rock.