Job 3:13 (ESV)

13 For then I would have lain down and been quiet; I would have slept; then I would have been at rest,

Death is not something desirable, as will become clear in Job’s later speeches. However, even death is preferable to the state that Job is in now. In death he would at least experience rest.