The equation is of the form
[tex]
\frac{\mathrm{d}y}{\mathrm{d}t} = P(t)y(t) + Q(t)[/tex]
with
[tex]P(t)\equiv -1[/tex] and [tex]Q(t):=\sum_{n\ge 1}{\frac{\sin(nt)}{n^2}}[/tex]. So, try with the formula
[tex]
y(t) = \exp\left(\int{P(t)\mathrm{d}t}\right)\left(\int{Q(s)\exp\left(-\int{P(s)}\mathrm{d}s\right)\mathrm{d}s})\right) \biggr|_{s=t}[/tex]