Should there be a gap when adding insulation in a wooden outbuilding?
It looks like your building has studs. The best way to insulate between those studs is low-cost batt insulation, either fiberglass or mineral wool. If you want to use polystyrene foam sheets (like the EPS foam you're showing) the easiest and most cost-effective way to do it is to lay it across the studs, not between them. Use the cheap batts between the studs and save the more expensive and more-difficult-to-cut-and-shape foam for the usage where it's more practical: over the studs.

As for ventilation, you do not need any ventilation inside the wall or on the interior. The place for ventilation is on the outside of the wall. If it's not too late to do that (i.e. because you haven't yet applied the exterior finish materials), then it's always a good idea to build vertical ventilation channels under the finish material. This will greatly enhance the drying potential of the wall and make it a more robust building. And if you're in a position to do this, it makes sense to apply all the foam on the outside too, not on the inside. It's easier and more effective. You would apply the foam the outside of the board sheathing, install a weather-resistant barrier of Tyvek or another housewrap with taped seams over that as an air barrier layer (flashed to the windows and doors with window and door flashing tape), then insulate between the studs with fiberglass or mineral wool, and finally install your interior tongue-and-groove over the studs and fiberglass. Such a wall will resist the weather for hundreds of years assuming the roof does its part.

If the exterior finish material is already in place and you are not willing to remove them, then you'll need to install the foam on the inside. And you'll need to use another layer as your air barrier. The board sheathing on the outside is not airtight. And your choice of interior finish material--tongue-and-groove boards--is also not airtight. So your air barrier will need to be in the middle of the wall somewhere. Your best bet is treating the foam layer as your wall's air barrier, which entails caulking, taping, spray foaming, and otherwise air-sealing the seams to eliminate as many gaps as possible. Then cover up all the foam boards with tongue-and-groove boards.