What should I do if I cannot work due to chronic pain?

See a doctor. You will need to be evaluated by a physician. Perhaps there is a reason for your chronic pain which can be treated. Once treatment begins, then hopefully you could return to work.
See your doctor . Many causes of chronic pain can be treated and the pain made manageable. Between medication and minimally invasive injections plus the use of physical therapy and other treatments patients can live a fairly "normal" life.