I am calculating the Euclidean distances of a few pairs feature vectors $p, q$. Usually, I get distances in the range $[0, 2]$ however I've had some occasions (outliers) when the distance was more than $2$. I want to find a similarity metric between that depends on the distance between the two vectors and differentiates the distances considerably ranging in this range. For instance, something like
Although it doesn't give that much 'spread' I would hope for. How can I generate a function that gives the most spread for $[0,2]$ but at the same time maintains that for any distance, it is between $0$ and $1$?
An example of such similarity would be, for a given small $\epsilon >0$, the similarity score is $\in [\epsilon, 1]$ when $dist(p,q)\in [0,2]$ and $ \in [0, \epsilon]$ when $dist(p, q)\in [2, +\infty]$.