RE: first solo today!
It's good practice to simply never let the plane cross an obstacle. If you keep some daylight between the plane and the trees and such, you'll never be able to hit them no matter how far away you are. The issue of the OP's unsafe actions remains though. It's a fact that under stress we get tunnel vision. It's an automatic reaction that you can't do much about aside from reducing your stress. You can fly right into an obstacle and never see it until the instant before you hit it because your peripheral vision is gone. You need twice the space you actually plan to fly in so that if you make a mistake right at the edge of your flying area you still have enough room to correct it. When you get to be a better pilot, you can shrink your flying space but still must keep that extra room rule.