All of the following are possible:
The only thing left for him to do was to cry his heart out.
The only thing left for him was to cry his heart out.
The only thing left was to cry his heart out.
However, although they are all grammatically correct, there is a nuance of meaning. It is important to remember that context always makes a difference. English is a context-dependent language.
The only thing left for him to do was to cry his heart out
John had tried and tried to make it up with his girlfriend but she eventually got together with someone else. The only thing left for him to do was to cry his heart out.
In others words, he had exhausted all ways of dealing with the situation and only one remained - to cry.
The only thing left was to cry his heart out
This sounds quite impersonal. It seems as though he was working through a checklist. He had successfully completed all the items on the list and now only one remained - to cry his heart out. Maybe he was an actor and was shooting scenes for a movie. The last scene was for him to cry his heart out.
So please, when you are asking about a single sentence, give some context about the rest of the conversation. No-one simply speaks a sentence without some background to their utterance. Thanks