https://www.google.com/search?q=UN40FH5005GXZS&ie=utf-8&oe=utf-8 finds other than English so I'll try with Google Translate.

The first set appears to have NO OPTICAL or MiniJack so no to that model.
http://translate.google.com/translate?hl=en&sl=es&u=http://www.samsung.com/cl/consumer/tv-audio-video/television/led-tv/UN40FH5005GXZS&prev=search

http://translate.google.com/translate?hl=en&sl=es&u=http://www.samsung.com/cl/consumer/tv-audio-video/television/led-tv/UN40FH6203GXZS&prev=search shows a minijack so that should be fine.

HOWEVER some folk want both the speakers and the headset to work at the same time. NO to that.
Some folk want the headset volume to be controlled with the remote. NO to that as well.

Hope this helps,
Bob