Everard Gault had been missing in 1915; and waiting, not knowing, had been the loneliest time of Heloise’s life, her two-year-old baby her greatest comfort. Then a telegram had come, and soon afterwards she had closed her eyes in selfish relief when there was the news that her husband had been invalided out of the army. As long as they lived, she vowed to herself, she would never again be parted from him, her resolve an expression of her gratitude for this kind misfortune.
Is "close your eye to something" the same as "close your eye in something"?
And does the part in bold mean: when there was the news that her husband had been invalided out of the army she was not proud and selfish of this relief and vowed to herself that as long as they lived she would never again be parted from him and in this kind of misfortune she decided to show her gratitude because of that time and not to be parted from her husband?
Source: The Story Of Lucy Gault by William trevor