Use this stock as a base for dishes such as seafood chowder, bisque, stew, and risotto.
Remove head sacs (behind eyes) in carapaces; discard. Remove any green tomalley or red roe; reserve for another use or discard. Wrap shells in a clean kitchen towel. Using a rolling pin, meat pounder, or hammer, break shells (some large pieces might remain).
Heat oil in a Dutch oven or stockpot over medium heat until hot but not smoking. Add shells; cook until fragrant (do not let blacken), about 3 minutes.
Stir in onions, carrots, celery, and garlic, and fennel (if desired). Cook, without stirring, until vegetables begin to brown, about 3 minutes. Add tomatoes, wine (if desired), peppercorns, thyme, parsley, and bay leaf.
Fill pot two-thirds with cold water (about 4 1/2 quarts). Bring to a boil. Reduce heat; simmer. Skim froth from surface with a ladle. Cook until broth is aromatic and flavorful, about 1 hour 45 minutes.
Carefully pour stock through a fine sieve set over a large bowl or container. Discard solids; let stock cool completely. If not using immediately, refrigerate in airtight containers up to 3 days, or freeze up to 2 months.