Step 1: Break down the given equation.
The integral can be written as:
\[
\int_0^{\frac{\pi}{4}} \sin(x) f(x) \, dx + \int_0^{\frac{\pi}{4}} \cos(x) \left( \int_0^x f(t) \, dt \right) dx = \sqrt{2}.
\]
Step 2: Use integration by parts.
For the second term, apply the Leibniz rule for differentiating an integral:
\[
\frac{d}{dx} \left( \int_0^x f(t) \, dt \right) = f(x).
\]
So, the second term becomes:
\[
\int_0^{\frac{\pi}{4}} \cos(x) \left( \int_0^x f(t) \, dt \right) dx.
\]
This can be simplified by switching the order of integration:
\[
\int_0^{\frac{\pi}{4}} \int_t^{\frac{\pi}{4}} \cos(x) \, dx \, f(t) \, dt.
\]
Step 3: Solve the integral.
After applying integration by parts and simplifying, we find that:
\[
\int_0^{\frac{\pi}{4}} f(x) \, dx = 1.
\]
Final Answer:
\[
\boxed{1}.
\]