Hi Daniel,
I think you have to use transceivers and fibers, because afaik there are no 40G DACs.
See here: https://techdocs.f5.com/en-us/hw-platforms/f5-plat-accessories/title-transceivers.html#fiber-sfpplus-specs
If your chassis are relatively close to one another I'd go for F5-UPG-QSFP+BD. It supports up to 100 meters using OM3 fibers, and the connector is a standard LC duplex. If you need more than that distance, OM4 fibers can get you up to 150 meters.
If you already have 8-fiber parallel fibers with MPO/MPT connectors you can use F5-UPG-QSFP+SR4.
More than that (up to 10 km), you'll have to switch to single-mode fibers and use F5-UPG-QSFP+LR4 or F5-UPG-QSFP+PSM4.
/Mike