That situation has happened thousands of times! As I recall some guys got "Dear John letters" as early as basic training (4-8 weeks).
The guys who handled it right, took the letter as good information..figuring, "better to find out her nature now, rather than later, such as after marriage".
One fellow I served with from New Jersey, got just such a letter during is basic training. He faced it the best way he could..
That was way back in 1955, when we stored our M1s in racks in our barracks. Upon receiving the letter, he took her picture, frame and all, outdoors.
Then he got several of us "volunteers" to take our rifles out near where the garbage can enclosure stood.
First, using his entrenching tool, he dug a shallow 'grave', placed the picture with glass & frame, into the grave, and drove it down with a rifle butt.
Then after interring, we held a mock 'rifle salute'..and Pvt Kersey did a pretty good imitation of 'Taps'..even without an instrument..
Then the Dear John recipient, went ahead with his life and never looked back.
.