I think you have two options. (1) You could go for a view-space effect where you render everything first and then apply the heat-distortion as a post-processing effect to the 2D rendered scene. (2) Alternatively you could apply the effect in world space through vertex displacements in the vertex shader stage.
(1) View-space distortion could make use of the depth buffer to estimate the depth of objects, as jzx mentions. The advantage of this approach would be simplicity, as you are just operating on a part of the final 2D projected scene - i.e. a zone of pixels. The disadvantage you only have information of the nearest polygon for every pixel. This means distorting a foreground object can never reveal objects located behind it. This effect might therefore look give the impression of a fake, flat effect.
(2) By working in world-space, you can apply distortions to the vertices of all objects. The advantages are: 1. distorted objects can reveal objects behind them, 2. distorting of vertices is very efficient compared to distorting individual pixels (as the rasterization process, in hardware, will take care of all fragments inbetween the vertices) - unless you have a scene with (extremely) many overlapping objects, 3. you can use a 3D function to drive the intensity of the distortion throughout space, which seems very elegant as compared to using a bounding volume. 4. the effect is applied in 3D, meaning distant objects will natrally have less distortion than near ones, solving the problem of the "fake, flat distortion effect".
In summary, you can go for 2 broad approaches: distortion in view-space and distortion in world-space. I would use the latter for better visual results, more elegancy and likely more performance.