'He hasn't worked since October' is fine. (Since + a specific point in time)
'He hasn't worked for 4 months' is fine. (For + a duration of time).
BUT 'He hasn't been working for 4 months' isn't correct (at least without a much wider context). We wouldn't normally use the Present Perfect Continuous in the negative like this. However, we could use it in the positive (He has been working for 4 months).