The 49-year-old Spaniard said he will not be extending his contract, which expires at the end of Qatar 2022, after Belgium failed to get out of their group.
Martinez, who led Belgium to a third-placed finish at Russia 2018 after taking on the role in 2016, was asked if the hugs he gave his players after being held by Croatia were "goodbye hugs".
"Yes, that was my last game with the national team," the former Everton boss said. "This is emotional, as you can imagine. I can't carry on (answering), sorry."
When asked if he was sorry to have bowed out on a disappointing note, Martinez added: "I never look at it that way. I'm a person who likes to build things.
"I've been six years with the national team. I arrived with a clear job of qualifying for the World Cup and you get so engaged with the project and the people behind the players.
"And then we finished with a bronze medal (at Russia 2018) and it felt that we had to give it another go and it's been a real joy.
"We've been able to build a real legacy, and I know a lot of people say you can only build legacy by winning a major tournament, but I see it in a different way. I'm so proud of these players."
Belgium finished third in Group F, behind winners Morocco and Croatia, having previously beaten Canada 1-0 before losing 2-0 to the North Africans.
When explaining what had gone wrong in Qatar, Martinez said: "I think it's very clear. You come to the World Cup and you have to play three games and we only played one.
"The first games we were fearful, not the team that we are. We listened to the outside noise, we were feeling the responsibility. We played thinking if we lose a game we could be out and that's what cost us.
"Today was a performance and I felt we were the better team. We created better chances. Croatia are a great side and I felt today, had we gone through, you would have seen the real Belgium."
Croatia, who had drawn 0-0 with Morocco and beaten Canada 4-1, finished second in Group F and in the last 16 will face the winners of Group E, which is currently led by Spain.
Head coach Zlatko Dalic congratulated his players on reaching the knockout phase and admitted his side had enjoyed good fortune.
Dalic said: "I certainly expected a difficult match against a great team. Belgium cannot play three matches in a row in a very bad manner and this was a decisive match.
"But Croatia were great, especially in the first hour. We had a clear penalty, but VAR ruled against us.
"It is to be expected that a team such as Belgium would have certain chances and I must be honest and say that we were also lucky, they didn't take their chances in the end."
Dalic, who said friend Martinez would be a big loss to Belgian football, added: "It was a great match, but very difficult match to watch, to lead and it was difficult to play, but this is football."