The inspiration for this question is in a certain breakdown of the analogy between holomorphic and harmonic functions.

First recall the **Cauchy integral formula**:
Let $U$ be an open subset of $\mathbb{C}$, let $p$ be a point in $U$, let $f$ be a holomorphic function on $U$. For closed curves $\gamma$ in $U\setminus\{p\}$, define

$F(\gamma)=\frac{1}{2\pi i}\displaystyle\int_\gamma \frac{f(z)}{z-p}dz$.

Then if two curves $\gamma_1$ and $\gamma_2$ are homotopic in $U\setminus\{p\}$, we have $F(\gamma_1)=F(\gamma_2)$.

Let's try a **naive generalization of this to harmonic functions**. Let $U$ be an open subset of $\mathbb{R}^n$, let $p$ be a point in $U$, let $f$ be a harmonic function on $U$, and let $\mathcal{A}$ be the "space of spheres in $U$ containing $p$ in their interior":
$\mathcal{A}=\{(x, R)\in U \times \mathbb{R}^+ : S_R(x) \subseteq U, \ p \in B_R(x) \}$.

The *Poisson kernel* gives a function $F:\mathcal{A}\to \mathbb{R}$, mapping a sphere $S_R(x)$ to the value at $p$ of the harmonic function on $B_R(x)$ whose boundary values are the same as $f$'s:

$F(x,R) = \frac{R^2-|p-x|^2}{n\omega_n R} \displaystyle\int_{S_R(x)} \frac{f(y)}{|y-p|^n}$.

For spheres $S_R(x)$ such that all of the ball $B_R(x)$ is in $U$, the harmonic function on $B_R(x)$ whose boundary values are the same as $f$'s is just the function $f$. So $F(x,r)= f(p)$. Thus $F$ is constant on $\{(x, R) : S_R(x) \subseteq U, \ p \in B_R(x), \ B_R(x)\subseteq U \}\subseteq\mathcal{A}$, the "homotopy equivalence class" of spheres whose interiors are completely in $U$ -- just like in the Cauchy integral formula!

But **the analogy fails** once we try to extend this for spheres $S_R(x)$ whose interior isn't completely in $U$. For example, if $U$ is $\mathbb{R}^n\setminus\{0\}$, and the harmonic function is the Green's function $\Gamma$, then on the "homotopy equivalence class" of spheres containing both $p$ and $0$, the function $F$ can take many values (certainly all values less than $\Gamma(p)$).

I'd like to know **whether there are some conditions I can impose** on my harmonic function $f$ to make the analogy true. One possibility that I can think of is to demand that

$\displaystyle\int_{S_R(x)}\nabla f \cdot \nu = 0$

for any sphere $S_R(x)$ in $\mathcal{A}$ -- the idea being that I think in two dimensions this is the condition for a harmonic function to admit a harmonic conjugate.