Energy map and effective metric in an effective-one-body theory based on the second-post-Minkowskian approximation