There is an easy solution but with many steps.
Frist , you will measure the diagonal line between the two closer points. (as the picture ).
2- Use Add XY Coordinates to your point feature class .
3- Use Spatial Join and make the join feature class and target feature class is your point feature class (same layer). and Join operation one to many , and match option within a distance and the distance is the diagonal distance the measured in step 1.( as the picture)
4-After Join we should delete the join with the same point , so we will go to attribute table and make a query ("TARGET_FID" = "JOIN_FID") to select those points then delete them. (as the picture)
5- The main operation in this solution is using XY To Line tool. and define Start X field and Start Field as the x and y coordinates of target fields and End X field and End Field as the x and y coordinates of Join fields (Vice versa). and define same spatial reference.
6-Finaly , you will get the square and diagonal lines. as you want. But you will need to Use Dissolve tool, to remove the duplicate lines .