I've taken time off work in the past (by resigning), and found it very helpful to stop my mind cycling through the same worn negative mental pathways caused by work related stress & my perception and emotion about that situation. From memory, after about a month of time off -- with plenty of time outside exercising, lots of discussions with friends and former colleagues, and no software development -- I felt complete…
mind discussing a bit more about how you started doing contract work? I'm very interested in this, but unsure how to make it into a reliable source of income
Some recruiters also run agency businesses where after successfully matching you to work at a contract for a client , they handle stuff like invoicing, in return for taking their own (perhaps quite large) cut on top of your agreed daily contract rate. This can be an easy way to get started since they sort out some stuff for you, but there's more potential profit if you learn how to operate without relying on this.
There can be legal issues where it is unclear if a worker should be classified as a contractor or an employee, which could result in the worker paying more or less tax, or the employer being liable to give additional benefits to contractors who are actually deemed as functioning as employees, or so on. Another thing to think about is insurance & liability -- if a client pays you $10 to write some code, and your code has a defect and causes the client $1b in losses to their business, can they sue you for $1b? $10? etc.