Objective: Previous quantitative research has suggested that there is a link between housing, the urban environment, and mental health. However, methodological and design issues make it difficult to disentangle the relative influence of dwelling specific and wider urban environmental influences on individual mental health. The aim of this study was to explore the link between the dwelling, the immediate urban environment, and mental health to generate a new conceptual framework by which understanding of dwelling and urban environmental influences on mental health can be advanced. Design and participants: Qualitative interviews and focus groups were conducted with 32 inner city residents. Participants, stratified by sex and mental health status, were randomly recruited from a wider quantitative survey. An almost equal number of men and women as well as people with or without mental health problems participated, allowing for comparison of experience. Data were analysed inductively to generate an appropriate theoretical framework regarding dwelling and urban environmental influences on mental health. Setting: An inner city neighbourhood of about 6200 people in north west London. Most of that population live in public housing. Main results: The principal study finding is that between the dwelling unit and the neighbourhood unit, evidence was found for another meaningful contextual unit of analysis, the "residential bubble" through which effects on mental health can be mediated. The residential bubble describes a limited area of three dimensional space that surrounds a dwelling, encompassing immediate neighbours (above, below, and adjacent) and shared public space bordering the dwelling. Positive events and processes within the bubble had a beneficial influence on mental health whereas negative ones tended to have a damaging influence. These seemed to disproportionately have an impact on people with pre-existing mental health problems. Conclusion: The concept of the "residential bubble" may be a meaningful new contextual unit of analysis in urban mental health. This may have important implications with regards to interventions and measurement development.