Nonpolynomial Lagrangian approach to regular black holes