I'm not sure if this is the kind of thing you were after, but you can consider replacing the Fourier series with the Fourier transform.
Let me elaborate.
$2\pi$-periodic functions $\mathbb R\to\mathbb C$ which are locally $L^2$ are in one-to-one correspondence with the space $L^2([0,2\pi])$.
You can write such functions as a Fourier series.
So, if $f\in L^2([0,2\pi])$ (or $f\colon\mathbb R\to\mathbb C$ is $2\pi$-periodic and $\int_0^{2\pi}|f|^2<\infty$), you can write $f$ as a Fourier series
$$
f(x)
=
\sum_{k\in\mathbb Z}\hat f(k)e^{ikx},
$$
where $\hat f(k)$ is the $k$th Fourier coefficient.
The series converges in $L^2$ — or in better ways if you assume more regularity for $f$.
$2\pi$-periodic and locally square integrable functions are also Schwartz distributions (but not $L^2$ functions on the real line).
This means that the Schwartz (dual) theory of Fourier transform is applicable, and
$$
f(x)
=
\int_{\mathbb R}\tilde f(p)e^{ikp}dp
$$
in the sense of distributions.
(For distinction, I denote the Fourier series by a hat and the Fourier transform by a tilde.)
In the case of our periodic $f$, we have
$$
\tilde f(p)
=
\sum_{k\in\mathbb Z}\hat f(k)\delta(p-k).
$$
That is, the Fourier transform of a periodic function is a delta comb supported on the integers.
The point is that the theory of Fourier transforms on distributions contains the theory of Fourier series.
This makes it easy to study almost periodic functions: they look almost this way.
Details depend on your definition of "almost", of course.
Perhaps your Fourier transform would be a delta comb plus some small noise?
But there is more:
The theory of the Fourier transform on the real line (of Schwartz functions, $L^2$ functions, or Schwartz distributions) does not need any kind of periodicity.
You are free to use any kind of functions (that belong to the appropriate function space), and Fourier techniques still apply.
I assure you, the Fourier transform is immensely powerful, so it is far from completely unusable.
For example, I do mathematical research for a living, and a week ago I proved an interesting and surprising theorem using the one-dimensional Fourier transform without any form of periodicity.
I won't disclose details before the result is published, but I hope you can take my word that Fourier techniques are useful beyond periodic problems.
I am not the only one to apply them.
Appendix: Compactly supported perturbations
One particular kind of perturbation of a periodic function is compactly supported.
That is, the function is $f=g+h$, where $g$ is $2\pi$-periodic and $h$ is compactly supported (vanishes outside some bounded interval).
Now $\hat g$ is a Dirac comb weighted by Fourier coefficients as described above.
Also $\hat h$ has very special form, and it is very different from that of $\hat g$.
By the Paley–Wiener theorem the Fourier transform of a compactly supported function (or distribution) is analytic (real analytic and can be extended as complex analytic).
The smoother $h$ is, the faster $\hat h$ decays at infinity.
The two parts are more clearly distinguishable on the Fourier side:
you have a Dirac comb and a very smooth function.