A proximal method for composite minimization