Yes, it does. At least in my experience. The cities I lived in which had more mixup were certainly the ones with a better social climate, people talking with each other, helping each other, taking note of each other’s sorrows and doing sth. about it. On the other hand in a segregated city you have districts who get estranged of each other, or outright hate each other. The rich ones never leave their part of town because they are afraid and heard all kind of stories about these districts. And the poor ones go to work in a distric were people don’t even know they exists.
I wouldn't say it maximises happiness but it does serve to mitigate ghettoisation. In the UK they've done a good job of this, you'll often see council housing mixed into upmarket areas. Also all newly built developments are required by law to have 20% allocated as "affordable" and social housing.
Putting rich and poor people together maximize happiness?