Having said that, i think that approach is dependant on a work culture that cares about your wellbeing and mental health, and a good relationship with your manager so you can be comfortable giving them at least some idea that somthing is going on.
I hope they would want to support you!