Piecewise linear approximations in nonconvex nonsmooth optimization