ODE - eigenvalue problem with integral condition

Suppose we have a second order eigenvalue problem with kinda special nonlocal condition.
The equation takes form of a simple harmonic oscillator ( neither driven nor damped) on (0,Pi), but its not necessary, conditions are main deal.
First one is something like y(0) = 0,this is ok, but second one is , lets simplify it, " measure of positive semi-wave of solution = measure of negative semi-wave of solution" (in fact its measure with parameters for both semiwaves that are, in general, not equal). Measure = area under curve, so there definite integral takes place.
To be clear, im not asking for code, i just wanna know whether is possible to deal with integral conditions with Mathematica.
Thanks

Suppose we have a second order eigenvalue problem with kinda special nonlocal condition.

The equation takes form of a simple harmonic oscillator ( neither driven nor damped) on (0,Pi), but its not necessary, conditions are main deal.

Must confess not to understand that. I mean, the first function (on {0,2 Pi}) jumping into mind as solution of a second order equation is Sin. It has

Integrate[Sin[x],{x,0,2 Pi}] = 0
Sin[0] = 0

as well as e.g.

Sin[Sin[x] + x]

and

Sin[x + Sin[x] Cos[x]]

do have. But these three examples by no means follow the same ODE. The condition on the measure is much weaker than the restriction a ODE imposes onto the solution: The measure condition could be fulfilled also by a non-differentiable function.

Usually, if one wants the solution of a differential equation to hold some conservation law, one gains the differential equation itself by differentiation of the conservation law.