  A fundamental result in extremal graph theory attributes to Mantel's theorem,
which states that every graph on $n$ vertices with more than $\lfloor n^2/4
\rfloor$ edges contains a triangle. About half of a century ago, Lov\'{a}sz and
Simonovits (1975) provided a supersaturation phenomenon, which asserts that for
$q< n/2$, every graph with $\lfloor n^2/4 \rfloor +q$ edges contains at least
$q\lfloor n/2 \rfloor$ triangles. This result solved a conjecture proposed by
Erd\H{o}s in 1962. In this paper, we establish a spectral version of the result
of Lov\'{a}sz and Simonovits. Let $Y_{n,2,q}$ be the graph obtained from the
bipartite Tur\'{a}n graph $T_{n,2}$ by embedding a matching with $q$ edges into
the vertex part of size $\lceil n/2\rceil$. Using the supersaturation-stability
method and the classical spectral techniques, we firstly prove that for $n\ge
300q^2$, each graph $G$ on $n$ vertices with $\lambda (G) \ge \lambda
(Y_{n,2,q})$ contains at least $q\lfloor n/2 \rfloor$ triangles. Moreover, let
$T_{n,2,q}$ be the graph obtained from $T_{n,2}$ by embedding a star with $q$
edges into the vertex part of size $\lceil n/2\rceil$. Secondly, we show
further that $T_{n,2,q}$ is the unique spectral extremal graph that contains at
most $q\lfloor n/2 \rfloor$ triangles and attains the maximum of the spectral
radius. This result answers a spectral triangle counting problem due to Ning
and Zhai (2023). Thirdly, we present an asymptotically spectral stability
result under a specific constraint on the triangle covering number. The third
result could be regarded as a spectral extension of a recent result proved by
Balogh and Clemen (2023), and independently by Liu and Mubayi (2022).
