According to the work energy theorem we have
We+Wg=12mv2
We have work done by electrostatic force as
We=qElsinθ
and work done by the gravitational force as
Wg=mg(l−lcosθ)
Thus we get
qElsinθ+mg(l−lcosθ)=12mv2
Thus we get
mgsinθ+mgl−mglcosθ=12mv2
as θ=45o, we get
mgl=12mv2
also as v=ωl
we get
ω=√2gl