For the eigenvalues λn of a differential operator, the series MathClass-op∑nλn, generally speaking, diverges; however, it can be regularized by subtracting from λn the first terms of the asymptotic expansion, which interfere with the convergence of the series. The sum of such a regularized series is called the trace of Gelfand–Levitan type. A second‐order differential pencil on a finite interval with spectral parameter dependent boundary conditions is considered. We derive the regularized trace formulae of Gelfand–Levitan type for this operator. Copyright © 2013 John Wiley & Sons, Ltd.