implicitEuler[f_,u0_,h_,t0_,T_]:=(
n=Ceiling[(T-t0)/h];
t=Table[i h,{i,0,n}];
y=Table[0,{n+1}];
y[[1]]=u0;
For[i=1,i<n+1,i++,
initialGuess=y[[i]]+h f[t[[i]],y[[i]]];
y[[i+1]]=yNew/.FindRoot[yNew==y[[i]]+ h f[t[[i+1]],yNew],{yNew,initialGuess}]
];
y
)

λ=1000000;
f[t_,y_]:=λ(-y+Sin[t]);
y=implicitEuler[f,0,0.1,0,10];
plotAppr=ListPlot[Table[{t[[i+1]], y[[i+1]]},{i,0,n}],
PlotRange->All];
c=(λ/(1+(λ^2)));
plotExact=Plot[c (E^(-λ t))+((λ^2)/(1+(λ^2)))Sin[t]-(λ/(1+(λ^2)))Cos[t],{t,0,10},PlotStyle->Red];
Show[plotAppr,plotExact,PlotRange->All]