Yes, the work-energy method can be used. The particular difficulties you noticed can be dealt with by considering the chain in 2 parts : that part hanging down (which loses PE but experiences no friction) and that part remaining on the table (which does not lose PE but experinces friction).
Suppose the mass of the chain is $M$. In the initial position, the CM of the overhaning section is $\frac{d}{8}$ below the table. The section remaining on the table has $0$ PE. So the initial PE of the chain relative to the table is $-\frac14Mg(\frac{d}{8}) = -\frac{1}{32} Mgd$. When the last link of the chain slips off the table then the CM of the whole chain is $\frac{d}{2}$ below the table so the PE is $-\frac12 Mgd$. The decrease in PE is
$(\frac12-\frac{1}{32})Mgd = \frac{15}{32}Mgd.$
When length y of the chain remains on the table then the friction force on it is $\frac15Mg\frac{y}{d}$ where $\frac15$ is the coefficient of friction. The work done against friction is
$\int \frac15 Mg\frac{y}{d}dy = \frac15 Mg[\frac{1}{2d}y^2] = \frac{9}{160}Mgd$
where the limits of integration are from $y=\frac34d$ to $0$.
The KE of the chain when the last link slips off the table is therefore
$\frac12MV^2 = (\frac{15}{32}-\frac{9}{160})Mgd$
$V^2=\frac{33}{40}gd$
where V is the velocity at this point.
Alternatively you can apply Newton's 2nd Law :
$F = M\frac{dv}{dt} = M\frac{dv}{dy}\frac{dy}{dt} = -Mv\frac{dv}{dy}$.
When length y remains on the table the force accelerating the chain is $Mg\frac{d-y}{d}$, while the friction force retarding motion is $\frac15Mg\frac{y}{d}$.
The equation of motion is
$-Mv\frac{dv}{dy} = Mg(1-\frac{y}{d}) - \frac15Mg\frac{y}{d} = (1-\frac65\frac{y}{d})Mg$
$2v\frac{dv}{dy} = (2\frac65\frac{y}{d}-2)g$
$v^2 = (\frac65\frac{y^2}{d}-2y)g$.
The limits of integration are $v=0$ to $V$ and $y=\frac34d$ to $0$. So
$V^2 = (\frac65(0-\frac{9}{16}d)-2(0-\frac34d))g = \frac{33}{40}gd$.