Controlling depth pass

I’m trying to figure out how to use a depth pass to control field blur in post processing. But when I run the depth pass render I get a wave effect bringing the focus in and out as it goes back. Is there anyway to set the range so I don’t get multiple in focus fields in large scenes?