How is it going to be held to the ground?
In the detail you show there, it appears that the upper horizontal member is butted up against the two vertical members and furthermore, the two vertical members extend higher than the horizontal support.
Because of this, you do not have an adequate moment connection between the members. If you assumed this as having restrained ends, you would get a certain amount of fixity between the two parts, but in reality, the vertical member would "oilcan" *out* at the upper weld and *in* at the lower weld of the connection of the horizontal support. So, unless you change that portion of the detail, you should probably calculate it as a simply supported beam with a load in the center.
What kind of steel are you making this out of? If it is 40mm sq tubing, then you're probably building this in Europe. If that's the case, then assume a simply supported beam, add any torsion due to offset of load, determine your required section modulus (including the correct safety factor) and find your corresponding tube size from the tables here:
The tubes you can obtain most easily in western Europe should conform to EN 10210:S355.
Engineering is not the science behind building. It is the science behind not building.