Try horizon_offset / (screen_height / 2) = tan (pitch) / tan (vertical_FOV / 2).
Look at the picture, and the formula will turn out by itself.

(source: zwibbler.com )
.
Update I mixed up two angles. One of them is the angular view of the camera, and the other is the angular view of the screen. These are two different things. The latter depends on the viewing distance. You may need to estimate this distance and adjust the zoom and / or focal length so that the objects visible on the screen have the same angular size as the same objects that are visible to the naked eye. (In my particular phone, you will need to enlarge the image 3 more times after 5x enlargement if the user reaches out to the phone until it stops). Then the two angles coincide, and the formula works.
If you want to enter the magnification (i.e. the objects on the screen have dimensions different from their real counterparts), multiply the horizon offset by the magnification factor.
Update 2 Considering the viewing distance, the screen size is reduced, and the offset just becomes viewing_distance*tan(pitch_angle) (with an increase of one).
source share