There is no way to stop all bad energy from entering your home. We are all human and bring bad moods, anxiety and other negatives into our lives just by living. Be judicious in who you bring in your home and what mental state they are in. If you have had an argument or other negative interaction, use a light cleansing incense (there’s a great scent called “cleansing” available at Crone’s Hollow).
For deeper protection of your home and yard you can ward your space. This is a ritual process where you go into the four corners of your yard and ask for the protection of your ancestors/familiars/protectors/dragons. When they are present, pound a railroad spike or other large pieces of metal into the corner to pin the energy there and to claim your land. Do this in all four corners of the yard. Occasionally go outside and visit your wards and make a small offering appropriate to the entities you’ve invited. Beer, mead, eggshells, a stone, shells or coins are some suggestions. Bury the offering near the spikes and leave them there.
For additional information on protection spells visit your local metaphysical shop. Most shops have friendly witches behind the counter with years of experience who can guide you through the specifics of what’s going on in your home.