On this website, I do not always get to give good news, and this is one of these times.
If he has a LIVING WILL or a POWER OF ATTORNEY that names someone else than you as the person to make decisions for him if he lacks capacity, then, that overrides any default rules. The document then also does not allow you access to his medical records in most cases. So that may be something he drafted prior to going into surgery (which is common for people to do).
Even if he did not draft such a document, provided that he has capacity and is aware, he can decide who visits him and who gets medical records. Even if you have an informal separation which really does not mean anything legally, provided he is conscious and has capacity, he can (1) control who visits him and (2) who gets updates, and block even his own spouse from visiting.
As such, the following are then the likely scenarios based on what you have told me:
1) He lacks capacity but a legal document in place has him name someone else to make decisions for him who is not you; or
2) He has capacity, but has decided not to allow you to visit or to release any medical information (which he has a right to do, even if to his spouse).
Please note: If I tell you simply what you wish to hear, this would be unfair to you. I need to be honest with you and sometimes this means providing information that is not optimal. Negative ratings are reserved for experts who are rude or for erroneous information. Please rate me on the quality of my information; do not punish me for my honesty.
I hope this helps and clarifies. Please use the SEND or REPLY button to keep chatting, or please RATE when finished. You may always ask follow ups at no charge after rating. Kindly rate my answer as one of TOP THREE FACES/STARS and then SUBMIT, as this is how experts get credit for our time. Rating my answer the bottom two faces/stars (or failing to submit the rating) does not give me credit and reflects poorly on me, even if my answer is correct. I work very hard to formulate an informative and honest answer for you; please reciprocate my good faith with a positive rating.