Have an honest and open conversation with your boss and get a medical certificate to cover the time until your Mat Leave starts and stay home.

Sorry you are feeling poorly, you don't need work making it worse.