Here are a few comments:
Any solution will be of the form $S=\{0,1,s_2,\cdots,s_j,n-1,n\}$ and then $S'=\{0,1,n-s_j,\cdots,n-s_2,n-s_1,n-1,n\}$ is also a solution.
There is the potential for an optimal symmetric solution ($S=S'$) when $m(n)$ and/or $n$ is even.
For $n=2d^2-2$ there are optimal symmetric solutions with $|S|=4d-3$. These are the ones listed by Rob Pratt for $n=6,16.$
- $\{0,1,2,3,7,11,15,19,23,27,28,29,30\}$ works for $d=4.$
- $\{0,1,2,3,4,9,14,19,24,29,34,39,44,45,46,47,48\}$ works for $d=5.$
This is, of course, just the scheme suggested by Gerry Myerson with a very minor adjustment.
It is curious that $m(32) \lt m(31).$