This question already has an answer here:
Looking for a short story where Happily Married woman discovers that she was a male astronaut on a Medical Ship and that her Husband is the Pilot. As I remember the Ship crashed during a war and She is drugged to feel that she has a happy life. One day the Drug (In the shape of an egg) is boiled, thus rendering it ineffective. Can't quite remember how the story ends except I recall her continuing to take the drug to remain happy whilst her "Husband" will live with the knowledge that they will never be rescued.