Critical behavior of erbium fiber lasers in pulsed and relaxation oscillations regimes