She and Harm eventually (after years of denial) proclaimed their love to each other and -- despite Mac's small chance to have a child due to endometriosis -- decided to get married in the last episode. Also during the last episode, Mac, and Harm decided to be fair about who would remain in service, and who would resign, or retire, by way of a coin flip (the outcome was never shown, therefore, no one is aware of Mac's status in the Marines, or of Harm's status in the navy.)

What episode do harm and mac get together? Let's have some stream of consciousness first.
To answer the question, consider the following: She and Harm eventually (after years of denial) proclaimed their love to each other and -- despite Mac's small chance to have a child due to endometriosis -- decided to get married in the last episode. So, the answer is the last episode.