Let $C \subset \mathbb{R}^d$ be a closed convex set. Let $f : \mathbb{R}^d \rightarrow \mathbb{R}$ be a continuous function which is convex on $C$ with the following property: there exists $\beta>0$ such that $f+ \beta \Vert \cdot \Vert^2$ is convex on $\mathbb{R}^d$.
I would like to show that there exists $\eta>0$ such that the function $f+ \eta \mathrm{d}(\cdot,C)^2$ is convex on $\mathbb{R}^d$ (where $\mathrm{d}(\cdot,C)$ stands for the distance to the set $C$, with respect to the euclidean norm).
If this is not true, I would like to find a counterexample.
I have been trying to play with the projection on $C$ but I am not able to conclude anything.
Any help is welcomed !
Clearly, it is true in $d = 1$.
The following is a counterexample in $d = 2$: Set $C := \{(x,y) \mid x \ge 0\}$ and $$ f(x,y) = \max(x,-y^2).$$
Then, $f$ is affine on $C$, $f + \lVert\cdot\rVert^2$ is convex, but $f + \eta \max(-x,0)^2$ has always some negative curvature in $y$-direction.
Here are some plots: $f$:
$f + \lVert\cdot\rVert^2$:
$f + \max(-x,0)^2$: