The two examples which the OP cited are formal, the first being very formal; and both are in the passive voice.
If I were to recast the two examples into the active voice, I would suggest the following:
My having been to South-Korea helped me learn the languages when I took the classes.
- The time I spent in South-Korea helped me learn the languages …
Being accepted to Harvard university was the greatest day of my life.
- The time Harvard University accepted my application, was the greatest day of my life
Note that Harvard University is capitalised, because it is the full and complete name of the institution.
- Is the use of gerund + past participle common in formal writing?
It is still used in formal writing but it is, without a shadow of a doubt, becoming less common in speech. If it's used sparingly in an essay, an English teacher might be favourably impressed but if the student resorts to using this type of construction whenever possible, it will sound at best antiquated and, at worst, pompous.
Some people maintain that the passive voice should be used whenever it is required, while others claim an overuse of the passive voice actually presents poor style.
Supporters of Strunk and White's The Elements of Style (1918) will say: “Use definite, specific, concrete language”, The active voice is usually more direct and vigorous than the passive:, and The habitual use of the active voice, however, makes for forcible writing. This is true not only in narrative principally concerned with action, but in writing of any kind.
In the end, choose the construction which you feel most confident with.
P.S Not all the examples of “tame sentences” cited by S&W are actually in the passive voice, and none begin with the gerund + past participle, just thought I'd warn you.