Definitely do NOT try fasting 40 days without medical supervision! You might survive, but it will make you sick and you will have a lot of work to regain your health. And it is not good for your soul. This is exceptionally dangerous if you also try fasting without water, because you don't even get to cleanse without plenty of water. Short fasts (a day, or two days) may be safe if you make sure you are getting plenty of water, but longer than that is best only attempted with medical supervision.
Of course, the whole work of fiction was written so, if you try abiding by what that nazarene thing did, your soul WILL be damaged. Ultimately, you will become open to being the perfect slave. Is that what you want?