I'm sure this will sound bad to some members, but I really would like to know, is there any reason why you would want to stay in Britain if you have no job?
Obviously if you are married to a UK resident you'd be entitled to all the out of work benefits that you meet the criteria for, including NHS exemptions but, if you are only here as a migrant worker, there would be no reason to stay if you have no job. I guess it would also depend on whether you are from Europe or outside of the EU
If you've got legal residency, irrespective of your work status (that is, you're not on a work related visa), then you ought to be entitled to NHS care.
Note: I'm not an expert, but a non-UK citizen resident in the UK since the early '80's.