Ok I did some testing this afternoon with the following things:
1. Fiio E18 USB AMP/DAC
2. Crappy earbud/mic headset that comes with PS4.
3. Beyerdynamic DT770 Pro Headphones
4. Zalman Zm-Mic1 Microphone
5. 3.5mm Headphone/Microphone Y splitter
First, the PS4 recognizes the Fiio DAC right away, to get chat audio to come through the headphones you just need to go into the settings and change the headphones to output "All Audio". Also, this DAC is also an amp, so the volume knob on it works just fine.
Now for the headset, plugging in the cheap headset that comes with the PS4 works just fine, it will default to send chat audio through that, but you can change that setting. To ensure it is configured properly just go to Settings - Devices - Audio Devices and set the input device to "headset plugged into controller" and output device to the DAC.
Next I tried using the Zalman mic plugged into the controller, this is just a normal PC mic. It was not recognized, however, if I plugged in the Y splitter, and plugged the mic into the microphone end of the splitter it was recognized as a headset and worked very well.
Third I tried plugging in the Y splitter to my DAC, the headphones worked, but the Mic did not, this makes sense since the 3.5mm port on the DAC is just a headphone port, it does not support a mic.
So in the end, plugging in the DAC via USB to power the headphones, and then a separate headset, or mic with a y splitter into the controller will work perfectly!
I was not able to test optical as my DAC does not have an optical input, however, I imagine it should work the same. If optical presents issues getting chat audio to play on your headphones, then the USB/3.5mm adapter device should do it with just the mic plugged in.