Effective action for scalar fields and generalized Zeta function regularization