I strongly recommend getting a house where you can walk out your door and walk somewhere without feeling unsafe because the road immediately outside your house is dangerous if you aren’t in a car and have the destination you are walking be a pleasant environment to be a pedestrian (i.e. not endless stroads).
The impact on your health, especially if you can win the lottery and get a job within walking distance, cannot be measured easily and most people vastly underestimate the savings and quality of life impact from not having to drive everywhere for everything.
Then I would definitely recommend moving somewhere where going out and meeting people is easy, whether it be hobbies, nightlife or other reasons to get together with new people and make friends. Definitely don't buy a house somewhere where it takes a conscious input of energy from yourself to see others as when we become depressed that is the HARDEST time to get ourselves to push through inertia. If you are anything like me you are going to end up on your couch feeling sad and a lot of times you won't push through that to drive the 30+ mins to whatever thing you were considering doing. You also can't be anywhere near as spontaneous about interacting with people and participating in different community events when every time you do it requires specific planning. If you live in town all it might take for you to get involved in something happening you were unaware of or thought you weren't interested in is to pass by it happening. When you live far away from things, you have to sit there on your couch and specifically make the decision while blobbing on your phone that you want to participate in whatever thing you are interested in, and that can be a lottttt harder when you are depressed, trust me lol.
If you want the feeling of being out in the sticks, pay attention to being close to mass transit or easy drives out into nature.
I'm an introvert who works with people, I could be a recluse all year and I'd be happy. Without work maybe I'd be a little lonely at times, but there is ways to fix that for me, without relying on neighbours.
You seem to like having neighbours though, so that's very different. If that is something that worked well for you in the past, I think that's an indicator for the more expensive house. It's a permanent thing, after all, and if you're rather extroverted or at least need humans around on occasion, then you shouldn't make yourself unhappy by buying cheap.
When I lived in the boonies I had a house like that. It was on a windy mountain road that was rarely traveled except on Sundays when people would drive their classic cars around. I could sit there with a beer after mowing my lawn and have my own private parade, and walk the couple miles into town no problem.
For work I just had to walk down the hall because shipping my brain through meatspace to push buttons in a different place is stupid.
Honestly, that sounds like a great lifestyle fit for you, but for many people there is a huge risk in that lifestyle in becoming extremely isolated from other people and not feeling like there is an easy way to escape that isolation.
A couple of mile walk into town is not the kind of thing someone who is feeling down but wants to maybe meet people is going to do unless the bicycling infrastructure is pleasant and easy to use. It also leaves you heavily dependent on having a healthy body to socialize which again I think is generally a bad idea as it is the times we are in poor health that we need friends the most.