I was off for 5 months a few years ago. I couldn't function anymore, it was hard to believe how seized up my whole body was until I felt better.
To be honest I wasn't better when I returned to work, well I was better but still not well.
I ended up getting some counselling free through work, I'd had some online sessions early on and this had got me to where I could breath but it clearly wasn't enough. I'd returned because I really couldn't cope with the guilt of my colleagues having to manage without me. Up until then, I'd rarely had a day off in over 35 years and even on maternity leave I'd only had about 5 months off.
Anyway, one week about 6 weeks into the counselling I just felt better, no idea why really, I hadn't reached an epiphany or a breakthrough, just felt better.
I'd managed to arrange a reduction in responsibilities and a slight reduction in hours as well and I've been fine with work since.
Currently splitting up with husband and honestly feeling fine about it.
I found getting the repeat sick notes pretty stressful though. I'd feel quite euphoric when I got a new one and had 4 weeks to not have to ask again and then get gradually more stressed as it was running out. I'd add that at no point did I actually have any issue being given one, gp was totally understanding. Just something to be aware of.
If you need to be off OP you need to be.