Aperture, distance, focal length: what really matters
At the same framing, depth of field depends mostly on the f-number and the sensor size: a 35 mm from 2 m and an 85 mm from 5 m at f/2 give nearly the same depth on the subject. What changes is the background: the longer lens magnifies it, so it looks more blurred and closer.