Create a Seamless Texture and Paint with the Pattern Stamp in Photoshop
By making a texture seamless, you can tile it infinitely for fills and brush painting without visible edges. This walkthrough shows how to square your image, remove seams with Offset and Content-Aware Fill, define a pattern, and paint with the Pattern Stamp tool.

Step-by-step instructions
Crop the texture to a square
Select the Rectangular Marquee Tool (M).
In the Options bar, set Style to Fixed Ratio and enter 1:1.
Drag a square selection over your texture.
Go to Image → Crop.
Remove seams with Offset and Content-Aware Fill
Go to Filter → Other → Offset…
Set Horizontal and Vertical to about half the image size and click OK (seams move to the center).
Select visible seams with a selection tool (Lasso/Marquee).
Press Shift+F5 (Edit → Fill), set Contents to Content-Aware, and click OK.
Run Filter → Other → Offset… again (swap direction if needed) and fill any remaining seams the same way.
Define the seamless pattern
Press Ctrl+A (Cmd+A on Mac) to Select → All.
Go to Edit → Define Pattern…
Name your pattern and click OK.
Fill an area with your new pattern
Make a selection where you want the fill.
Press Shift+F5 (Edit → Fill).
Set Contents to Pattern and choose your custom pattern.
Click OK to apply.
Paint with the Pattern Stamp brush
Select the Pattern Stamp Tool (nested under the Clone Stamp Tool).
In the Options bar, open the pattern picker and choose your seamless pattern.
Paint on the canvas to apply an endlessly tiling texture.